RSS Feed

Multiple Choice Questions on SQL Delete

Multiple Choice Questions on SQL Delete

1) What is the basic syntax for Delete query?

a) Delete * from tablename;
b) Delete from tablename;
c) Delete column1, Column2, column(n) from tablename;
d) All are correct.

2) Which clause in DELETE statement leads to perform delete with certain criteria?

a) Group
b) Group By
c) Where
d) Having

3) Is TOP used in Delete Query?

a) True
b) False

4) Which category Delete query exits?

a) DDL
b) DML
c) TCL
d) BPL

5) Does delete statement maintains lock?

a) True
b) False

6) Delete statements locks whole Table or a single Row at a time?

a) Delete never locks any table or row.
b) Delete never locks any row while deleting.
c) Delete locks only Row.
d) Delete locks both Row and table.

7) If a column in a table is set to an Identity and if user deletes the row from the table with the help of Delete statement. Will this resets Identity value for the table?

a) Delete never retain Identity
b) Delete never recognizes identity
c) Delete retain identity value
d) None of the above

8) Out of the below constraints which one is applicable on Delete query?

a) Row level constraints
b) Page level constraints
c) Table Level constraints
d) None of the above.

9) Can delete be used with Views?

a) Yes (with some limitations)
b) Yes (fully)
c) Can never be used with Views.

10) Does delete statement enables triggers?

a) Yes
b) No


Answers