Q: For a table 'sample_table' with 2 columns (col1, col2), which is the right statement to insert multiple records?
A: INSERT INTO sample_table VALUES ('col1', 'col2'), ('col1', 'col2'), ...
Q: Which of the following operations will be performed by DML commands?
A: Insert and Select
Q: “INSERT” is the same as “UPDATE”?
A: No
Q: Which of the following is not included in DML (Data Manipulation Language)?
A: Alter
Q: Is it possible to user the 'where' clause in an insert statement?
A: No
Q: Which one of the following is the correct syntax for an insert statement?
A: Insert into table_name (Col1, Col2,Col3) VALUES (Val1,Val2,Val3);
Q: In SQL, which command is used to add new rows to a table?
A: Insert
Q: For this example, predict the correct answer:TableName: userdetails
SELECT * FROM userdetails WHERE userName LIKE '%a';
A: Return all the users with a userName that ends with a letter a.
Q: What happens if you try to insert a duplicate value in a column with a unique constraint using an INSERT query?
A: The query fails and an error is returned
Q: In the below MySQL command, how many rows will be updated?
UPDATE person
SET lname='s',
Fname = 'p'
WHERE person_id = 1;
/* person_id is a primary key which has a value 1*/
A: Single row