Set - 2

Question 16 :

The Delete Statements:

Answer :

DELETE FROM table_name WHERE column_name = some_value
Delete All Rows:
DELETE FROM table_name or DELETE * FROM table_name


Question 17 :

Sort the Rows:

Answer :

SELECT column1, column2, ... FROM table_name ORDER BY columnX, columnY, ..
SELECT column1, column2, ... FROM table_name ORDER BY columnX DESC
SELECT column1, column2, ... FROM table_name ORDER BY columnX DESC, columnY ASC


Question 18 :

The IN operator may be used if you know the exact value you want to return for at least one of the columns.

Answer :

SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)


Question 19 :

BETWEEN ... AND

Answer :

SELECT column_name FROM table_name WHERE column_name BETWEEN value1 AND value2 The values can be numbers, text, or dates.


Question 20 :

What is the use of CASCADE CONSTRAINTS?

Answer :

When this clause is used with the DROP command, a parent table can be dropped even when a child table exists.