Advertisements
Advertisements
प्रश्न
Explain the following SQL function using a suitable example.
POWER()
Advertisements
उत्तर
POWER(): It returns the value of a number raised to the power of another number.
Example: SELECT POW(6,2);
Output: 36
APPEARS IN
संबंधित प्रश्न
Which method is used to get the row-id of the last modified row?
Which of the following belongs to an "aggregate function"?
Consider the table STUDENT given below:
| RollNo | Name | Class | DOB | Gender | City | Marks |
| 1 | Anand | XI | 6/6/97 | M | Agra | 430 |
| 2 | Chetan | XII | 7/5/94 | M | Mumbai | 460 |
| 3 | Geet | XI | 6/5/97 | F | Agra | 470 |
| 4 | Preeti | XII | 8/8/95 | F | Mumbai | 492 |
| 5 | Saniyal | XII | 8/10/95 | M | Delhi | 360 |
| 6 | Maakhiy | XI | 12/12/94 | F | Dubai | 256 |
| 7 | Neha | X | 8/12/95 | F | Moscow | 324 |
| 8 | Nishant | X | 12/6/95 | M | Moscow | 429 |
State the command that will give the output as:
| Name |
| Anand |
| Chetan |
| Geet |
| Preeti |
(i) select Name from student where Class ='XI' and Class='XII';
(ii) select name from student where not Class='XI' and Class='XII';
(iii) select name from student where City="Agra" or City="Mumbai";
(iv) select name from student where City in("Agra", "Mumbai");
Choose the correct option:
Assertion (A): COUNf function ignores DISTINCT
Reason (R): DISTINCT ignores the duplicate values.
What will be returned by the given query? Select round(23456.1234, -2) = ______.
What will be returned by the given query? select mid("Computer", 2, 4) = ______.
What will be returned by the given query? select day of year('2015-02-10') = ______.
What will be returned by the given query? select substr("Computer", 4) = ______.
"COUNT" keyword belongs to which categories in Mysql?
Name a function of MySQL used to give position of the first occurrence of a string2 in string1.
Which of the following is not a text function?
The string function that returns the index of the first occurrence of substring is ______.
Write the name of the functions to perform the following operation:
To display the specified number of characters from a particular position of the given string.
Write the output produced by the following SQL statement:
SELECT LENGTH("Informatics Practices");
Write the output produced by the following SQL statement:
SELECT LEFT("INDIA", 3), RIGHT("Computer Science", 4), MID("Informatics", 3, 4), SUBSTR("Practices", 3);
Which function is used to display the total number of records from a table in a database?
Which type of values will not be considered by SQL while executing the following statement?
SELECT COUNT(column name) FROM inventory;
Which one of the following is not an aggregate function?
Which one of the following functions are used to find the largest value from the given data in MySQL?
In SQL, which function is used to display the current date and time?
Write suitable SQL query for the following:
Display 7 characters extracted from the 7th left character onwards from the string ‘INDIA SHINING’.
Write suitable SQL query for the following:
Display the remainder of 100 divided by 9.
Explain the following SQL function using a suitable example.
MID()
Explain the following SQL function using a suitable example.
DAYNAME()
Shreya, a database administrator has designed a database for a clothing shop. Help her by writing answers to the following questions based on the given table:
| TABLE: CLOTH | |||||
| CCODE | CNAME | SIZE | COLOR | PRICE | DOP |
| C001 | JEANS | XL | BLUE | 990 | 2022-01-21 |
| C002 | T-SHIRT | M | RED | 599 | 2021-12-12 |
| C003 | TROUSER | M | GREY | 399 | 2021-11-10 |
| C004 | SAREE | FREE | GREEN | 1299 | 2019-11-12 |
| C005 | KURTI | L | WHITE | 399 | 2021-12-07 |
- Write a query to display cloth names in lowercase.
- Write a query to display the lowest price of the clothes.
- Write a query to count the total number of clothes purchased in medium size.
OR
Write a query to count the year-wise total number of clothes purchased.
Which function returns the sum of all elements of a list?
