Multiple Choice Questions - SQL Insert / Update

Multiple Choice Questions - SQL Insert / Update


1) Which one is correct syntax for Insert Statement?

a) Insert Columns(Col1, Col2,Col3);
b) Insert into (Col1, Col2,Col3) VALUES (Val1,Val2,Val3);
c) Insert Columns(Col1, Col2,Col3) VALUE (Val1, Val2,Val3) Into ;
d) None of the above.

2) Can the sequence & number of columns and values be different in an Insert statement?

a) True
b) False

3) How is Column wise insertion of data different from simply passing values to a table?

a) Column wise data leads in populating data on optional basis i.e. whether user wanted to insert data in a column or not.
b) We can’t pass value to a table without mentioning column names in an insert statement.
c) Passing values to a table without column names is always safe.
d) None of the above.

4) Update statement is used to insert values in a table and therefore it is a replacement of insert statement, is it correct?

a) True
b) False

5) Which one is correct syntax for Update Statement?

a) Update Table Columns(Col1, Col2,Col3);
b) Update into (Col1, Col2,Col3) VALUES (Val1,Val2,Val3);
c) Update Set Col_name=Value;
d) None of the above.

6) Is mentioning column name corresponding to its value mandatory in Update Statement?

a) True
b) False

7) What will be the consequence of omitting ‘Where’ clause in Update Statement?

a) No effect on the query as well as on table.
b) All records present in the table will be updated.
c) Only one record will be updated.
d) None of the above.

8) In any case, can update statement be used in place of insert statement?

a) Yes, if record exists with Identity value.
b) Yes, in every case.
c) No, it is not possible at all.
d) None of the above.

9) Can insert be used in place of update?

a) True
b) False
c) It is replacement of update.
d) None of the above.

10) Can we use ‘where’ clause in an Insert statement?

a) True
b) False

Answers