SQL MCQ
SQL MCQ
Select length(“LENGTH”) ;
a) Numeric value
b) Text value
c) Null value
d) Float value
2] If column “SCORE” of table PLAYER contains the data set (45,80, 35,15, 7) , what will be the output
after execution of the following query?
a) 38
b) 73
c) 8
d) 35
3] If column “temp” of the weather table contains the data set (45, 35, 35, 28, 28), what will be the
output after the execution of the given query?
SELECT AVG (DISTINCT temp) FROM weather;
a) 34.2
b) 21.6
c) 38.33
d) 36
4] Ravi is class 12 student. He is learning MySQL functions. He wants to know the category of mid()
function. Select an appropriate category to help him to understand well.
a) Math function
b) Text function
c) Date Function
d) Aggregate Function
SELECT round(155.9772,-1);
a) 155
b) 156
c) 160
d) 156
6] If column “venue” of table matches contains the data set (‘Ahmedabad’, ‘Baroda’, ‘Ahmedabad’,
‘Anand’, ‘Baroda’) , what will be the output after execution of the following query?
a) 5
b) 3
c) 2
d) 4
7] The correct SQL form below to find the temperature in increasing order of all cities
ii) max()
iii) power()
iv) now()
a) Only (i)
9] Observe this statement and select appropriate option: “Where and Having clauses can be used
interchangeably in SELECT queries“.
a) True
b) False
c) Only in views
d) With order by
10] Sohail is confused about which function returns the time when the function executes. Help him by
selecting the correct option out of the following:
a) SYSDATE()
b) NOW()
c) CURRENT()
d) TIME()
11]Prakash has been given a task to select a function used to display the current date and time. Select an
appropriate function for same.
a) Date( )
b) Time( )
c) Current( )
d) Now( )
a )3
b) am@2023
c) BoardEx
d) 3202@ma
Select Round(9999.299,2);
a) 9999.30
b) 10000.29
c) 19999.00
d) 10000.30
14] What is the use of a desc word along with order by clause?