Table of Content

SQL MCQ : Query Solving (Multiple Choice Questions)


Consider the following table “STUDENT” and answer the following questions –
[table border="1"] Roll,SName,City,Marks
1,Rajesh,Pune,90
2,Sanjay,Mumbai,90
3,Raj,Pune,95
4,Prakash,Delhi,91
5,Vikki,Pune,98
[/table]


Question 1
How many rows will be selected if we ran following query -
Select * from STUDENT;
A
4
B
2
C
5
D
1
Question 2
Which of the following query is used to select count of students from "STUDENT" table.
A
Select COUNT(ALL) from STUDENT;
B
Select COUNT() from STUDENT;
C
None of these
D
Select COUNT(*) from STUDENT;
Question 3
Which of the Query is used to Select all the Students from City = "Pune".
A
Select * from STUDENT where city == "Pune";
B
Select * from STUDENT where city is "Pune";
C
None of these
D
Select * from STUDENT where city="Pune";
Question 4
Which of the command is used to insert record in the table ?
A
INSERT INTO STUDENT 
      VALUES (6,Salman,Mumbai,90);
B
INSERT IN TO STUDENT 
      VALUES (6,Salman,Mumbai,90);
C
INSERT TO STUDENT 
      VALUES (6,Salman,Mumbai,90);
D
None of these
Question 5
SELECT SName,City FROM Customers WHERE Roll=8;
will return how many rows ?
A
1
B
3
C
2
D
0
There are 5 questions to complete.