SQL Create
11.What does the DROP TABLE students; command do?
-
A. Deletes rows from the table
-
B. Clears table data but retains structure
-
C. Completely removes the table from the database
-
D. Renames the table
Completely removes the table from the database
Completely removes the table from the database
12.What is the output?
Table A Table B
id | name id | city
1 | Rahul 1 | Delhi
2 | Priya - -
SELECT A.name, B.city
FROM A LEFT JOIN B ON A.id = B.id;
-
A. Rahul – Delhi Priya – NULL
-
B. Only Rahul – Delhi
-
C. Error
-
D. NULL – NULL
Rahul – Delhi Priya – NULL
Rahul – Delhi Priya – NULL
13.Which JOIN will produce rows even if there is no match in either table?
-
A. INNER
-
B. FULL OUTER
-
C. LEFT
-
D. SELF
FULL OUTER
FULL OUTER
14.Which aggregate function returns the smallest value?
-
A. MAX()
-
B. FIRST()
-
C. MIN()
-
D. LOWER()
MIN()
MIN()