This document contains multiple choice and open-ended questions about functions in MySQL. It asks the learner to:
1) Define functions and list 3 categories of functions along with examples.
2) Name date and string functions that return numbers or dates.
3) Write SQL statements to extract substrings, get string lengths, locate substrings, and retrieve month names and numbers.
4) Predict the output of SQL statements using functions like ROUND, MONTHNAME, MONTH, and RIGHT.
This document contains multiple choice and open-ended questions about functions in MySQL. It asks the learner to:
1) Define functions and list 3 categories of functions along with examples.
2) Name date and string functions that return numbers or dates.
3) Write SQL statements to extract substrings, get string lengths, locate substrings, and retrieve month names and numbers.
4) Predict the output of SQL statements using functions like ROUND, MONTHNAME, MONTH, and RIGHT.
This document contains multiple choice and open-ended questions about functions in MySQL. It asks the learner to:
1) Define functions and list 3 categories of functions along with examples.
2) Name date and string functions that return numbers or dates.
3) Write SQL statements to extract substrings, get string lengths, locate substrings, and retrieve month names and numbers.
4) Predict the output of SQL statements using functions like ROUND, MONTHNAME, MONTH, and RIGHT.
This document contains multiple choice and open-ended questions about functions in MySQL. It asks the learner to:
1) Define functions and list 3 categories of functions along with examples.
2) Name date and string functions that return numbers or dates.
3) Write SQL statements to extract substrings, get string lengths, locate substrings, and retrieve month names and numbers.
4) Predict the output of SQL statements using functions like ROUND, MONTHNAME, MONTH, and RIGHT.
1) ________________functions operate on a single value to return a single value. 2) SUM, AVG,COUNT are examples of ____________________functions. 3) SELECT POW(-3,2) will display the output: 4) INSTR(str,str2) returns the position of the first occurrence of ______in ________. 5) Any String function returns ____________ or ________________ type data.
Answer the following questions.
1) Define a Function. 2) List 3 categories of single row functions. Give two examples in each category. 3) Name a i) date function that returns a number. ii) String function that returns a number. iii) date function that returns a date. 4) Write SQL statements to do the following: i) Use the string "Internet is a boon" and extract the string "net". ii) Display the length of the string "Informatics Practices". iii) Display the position of "My" in "Enjoying MySQL". iv) Display the name of current month. 5) Write the output that the following statements will produce: i) SELECT ROUND(7.3456, 2); ii) SELECT ROUND(356.3456, -2); iii) SELECT MONTHNAME('2009-08-25'); iv) SELECT MONTH('2010-02-26'); v) SELECT RIGHT('Informatics', 4);