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
2
B
1
C
4
D
5
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
Select COUNT() from STUDENT;
D
None of these
Question 3
Which of the Query is used to Select all the Students from City = "Pune".
A
Select * from STUDENT where city == "Pune";
B
None of these
C
Select * from STUDENT where city="Pune";
D
Select * from STUDENT where city is "Pune";
Question 4
Which of the command is used to insert record in the table ?
A
INSERT TO STUDENT 
      VALUES (6,Salman,Mumbai,90);
B
INSERT IN TO STUDENT 
      VALUES (6,Salman,Mumbai,90);
C
None of these
D
INSERT INTO STUDENT 
      VALUES (6,Salman,Mumbai,90);
Question 5
SELECT SName,City FROM Customers WHERE Roll=8;
will return how many rows ?
A
2
B
1
C
3
D
0
There are 5 questions to complete.