This question is based on following table : TABLE : DELIVERY
This question is based on following table :
TABLE : DELIVERY
SNO | DBOY | ITEM | STAR | AMOUNT
1001 | AMAN | FOOD | 5 | 3000
1005 | JONES | MEDICINE | 3 | 5000
1008 | AMAN | MEDICINE | 2 | 4000
1009 | RAZID | FOOD | 4 | 4500
1010 | JONES | GIFT | 5 | 5000
1018 | AMAN | FOOD | 5 | 3000
1022 | RAZID | MEDICINE | 4 | 5000
Which of the following SQL commands will remove the rows, which have column value of STAR less than 5 ?
Show answerHide answer
Correct answer: (C) DELETE FROM DELIVERY WHERE STAR < 5;
Explanation
DELETE FROM table WHERE condition removes matching rows. There is no REMOVE command, DROP removes the whole table, and DELETE * is not valid standard SQL.