Welcome to QnA session MySQL Functions class 12 IP. In this article we will discuss some questions and answers from MySQL Functions chapter. Here we go!!
Important QnA MySQL Functions class 12 IP
Objective Type Questions (1 Mark)
Fill in the blanks – MySQL Functions class 12 IP
- A __________ is pre-defined set of commands that is used to perform a specific task and return values.
- The values that are provided to function is called __________ or __________.
- The ___________ functions allows to manipulate the text from table or string passed as parameter to the function.
- The ___________ function returns the character for the passed integer number.
- To display a specific word from a text, __________ function is used.
- The ____________ function removes leading extra spaced from the text.
- To know the length of specified text, the __________ function is used.
- The ___________ function accepts numeric values and returns numerical values as well.
- The ___________ function returns remainder of specified two numbers.
- A _________ MySQL function returns square of the given number.
- Mr. Kalpesh wants to ignore the fractional part of the number. A ___________ function will help him to serve his purpose.
- To know the square root of the given number in MySQL ___________ function will be used.
- The ___________ function returns only specified digits from the given digits.
- To convert the first letter of each word into capital, MySQL provides ____________ function.
- parameters, arguments
- substr() or substring() or mid()
MCQs – MySQL Functions class 12 IP
- Which following is not a category of MySQL functions?
- Text Functions
- Mathematical Functions
- Statistical Functions
- Arithmetic Functions
- What is the output – select concat(5,5) :
- Suppose playername and rank are the columns of an ODI_RANKING table. The user wants to print a record in this manner: Virat Kohli is ranked First. Where Virat Kohli is the player name and First is rank. Which of the following is the correct statement for the same:
- select concat(playername, ” is ranked “, rank) from ODI_RANKING where rank=”First”;
- select concat(concat(playername, ” is ranked “),rank) from ODI_RANKING where rank = “First”;
- select concat(concat(playername, ” is ranked “),rank) where rank = “First” from ODI_RANKING ;
- All of these
- What is the output of – select char(73,67,69); –
- Which of the following function can be used as lower(); –
- What will be the output of – select substr(“Year2020”,4,4) –
- None of these
- What will the output of – select round(12345.678,0); –
- What will be returned by sign(-15)
- Negative 15
- 4 Arithmetic Function
- 1 55
- Option 2
- 1 ICE
- 3 lcase()
- 3 r202
- 2 12346
- 2 -1
True/False – MySQL Functions class 12 IP
- Text functions cannot accept numbers as arguments. – False
- The concat() function make additions for two numbers. – False
- The substr() and instr() function returns similar output. – False
- The trim() function removes extra leading and trailing spaces from the text. – True
- The instr() function returns the index position of the specified word from selected string or text.
- The length() function ignore blank spaces from the text. – False
- When the string or text is null, length() function counts null as 1 character. – False
- The mid() function is synonym for substring() function. – True
- round() and truncate() functions returns the similar values. – False
- The sign() function returns the number with sign only. – False
Short answer questions – MySQL Functions class 12 IP
Consider the following table products and write answers for below given questions:
- Write the output of the following queries:
- select lcase(pname) from products where pname=’LED TV’;
- select sqrt(price) from products where price>50000;
- select mod(qty,3) from products;
- select substr(company,1,4) from products;
- select concat(concat(pname,”-“),qty) from products where compnany=’Apple’;
- select pname,truncate(mod(price,103)) from products where qty>100;
- select pcode, round(qty) from products where company in (‘Sony’,’MI’);
- select right(pname,4) from products where qty =10 or qty=20;
Try to write answers in comment section.
The next section for MySQL Functions class 12 IP contains query based questions.
- Write queries do display:
- To join product and company and display in tabular form like – iPad manufatured by Apple
- Convert all product named into capital
- Count total number of letters for all company.
- Display the cube of products quantity for more than or 100 in quantity.
- Remove P from the product and display the number in first resultant column, in second resultant column divide the remaining number by 3 and display number with 1 fraction digit.
- Display pname, qty, price with 2 decimal points and company for price in between 30000 to 80000.
Try to write these queries yourself and comment your answers.
Thank you for vising my blog.
Share the article MySQL Functions class 12 IP with your classmates. and feel free to ask your doubts in the comment section.
Unlock following and download the pdf.