Which two statements are true about Data Manipulation Language (DML) statements?
A. An INSERT INTO…VALUES.. statement can add multiple rows per execution to a table.
B. An UPDATE… SET… statement can modify multiple rows based on multiple conditions on a table.
C. A DELETE FROM….. statement can remove rows based on only a single condition on a table.
D. An INSERT INTO… VALUES….. statement can add a single row based on multiple conditions on a table.
E. A DELETE FROM….. statement can remove multiple rows based on multiple conditions on a table.
F. An UPDATE….SET…. statement can modify multiple rows based on only a single condition on a table.
The question needs to specify what “multiple conditions” means. If the condition is such as “where manager id = 10 and salary <2384" (per user Maicon), is it multiple conditions or a single condition?
IMHO, in Maicon's example, options B, D, E can be true unless there's a different definition of "multiple conditions".
update employees
set salary=6000
where salary<5000;
so that i think "F" also correct.
BE
i think AC
A insert command only can insert multiples row per execution when used with INSERT INTO table SELECT * from table2.
You can declare multiples conditions for DELETE, example:
delete from employees
where manager_id = 10
and salary < 2384
But I can’t See why C and F are not true? Can anyone help me please?
F . Update set can update one row only based on multiple condition.
So F is wrong.
C. Delete from statement can delete multiple rows based on one or more conditions.
So C is wrong.