Question

Explain date time functions and string functions.in my sql

  1. Explain date time functions and string functions.in my sql

Homework Answers

Answer #1

1. Date time functions in MySQL: They are used for a description of the range of values each date and time type has and the valid formats in which values may be specified. Few syntaxes are:

(a) ADDDATE() - adds date

(b) ADDTIME() - adds time

(c) CURDATE() - returns current date

(d) CURTIME() - returns current time

(e) DATE() - Extracts the date part of a date or datetime expression

(f) LAST_DAY() - Returns the last day of the month for the argument

2. String functions in MySQL:

(a) CHAR_LENGTH() - Returns the length of a string

(b) ASCII() - Returns the ASCII value for the specific character

(c) CONCAT() - Adds two or more expressions together

(d) LENGTH() - Returns the length of a string

(e) REVERSE() - Reverses a string and returns the result

(f) TRIM() - Removes leading and trailing spaces from a string

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Explain why an organization might want to consider restricting access to the following SQL functions: COUNT,...
Explain why an organization might want to consider restricting access to the following SQL functions: COUNT, MIN, MAX, AVG, SUM.
PL/SQL goal: storing inside a the string "Testing" storing inside b the string "out" storing inside...
PL/SQL goal: storing inside a the string "Testing" storing inside b the string "out" storing inside c the string "PL/SQL" printing out a,b,c concatenated  
How do i convert a Short date to a long date in Oracle SQL? for example.......
How do i convert a Short date to a long date in Oracle SQL? for example.... Convert 09/12/2015 to show as 12th September, 2015
Create a short program that demonstrates one of the functions shown below: Date class: long getTime()...
Create a short program that demonstrates one of the functions shown below: Date class: long getTime() Random class: set the seed and generate a random number Date class: toString() Date class: compareTo() Point 2D class: distance() String class: replace String class: split String class: match StringBuilder class: append StringBuilder class: insert StringBuilder class: reverse StringBuilder class: replace StringBuilder class: substring
Create a user-defined function in SQL to return a valid query author and date. This will...
Create a user-defined function in SQL to return a valid query author and date. This will be used for all views later on in future queries.
ON SQL Explain Normalization and Denormalization of data, What is ACID in SQL? Please explain in...
ON SQL Explain Normalization and Denormalization of data, What is ACID in SQL? Please explain in your own word as much as possible, List the steps in creating a View, List the steps in modifying a View, List the steps in creating a table, List the steps in modifying a table, What are the different Joins? please give examples, Create a database and populate the database with data of your choice, List and explain the different data types used in...
Python. create a function that takes a string as a parameter and prints out the following...
Python. create a function that takes a string as a parameter and prints out the following details as the example output below. If the string is "Hello, my name is Starling, Clarice. My, my, my, nice to meet you." The output would be: Unique words: 10 Number of commas: 5 Number of periods: 2 Number of sentences: 2 (HINT: Use the following string methods: split, lower, count, replace, format, and use the following functions: set, len. You may need to...
3. Look up the man pages for the following string functions from the C standard library,...
3. Look up the man pages for the following string functions from the C standard library, and write implementations of each: strcmp() Please explain your answer, thank you
Want to break the following code so that my functions are no larger than 10 statements...
Want to break the following code so that my functions are no larger than 10 statements def monthly_averages(records): """monthly averages""" list_of_average_steps_per_month = [] for month in range(1, 13): steps_for_month = [] for date, steps in records: rec_month = int(date[5:7]) if rec_month == month: steps_for_month.append(steps) if len(steps_for_month) > 0: average_steps_per_month = sum(steps_for_month) / len(steps_for_month) list_of_average_steps_per_month.append(average_steps_per_month) else: list_of_average_steps_per_month.append(-1) return list_of_average_steps_per_month
PYTHON Use Tkinter to display a My sql table and create a delete button that allows...
PYTHON Use Tkinter to display a My sql table and create a delete button that allows the user to delete entries with the vin field only ONLY error is displayed is the vin is not matched other wise Update tkinter if delete is successfuland dispaly updated table. Use the following database db = mc.connect( host="34.121.209.242", user="root", passwd="1234qwer", database="cars" )
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT