SQL INTERVIEW QUESTION & ANSWERS
66. |
What types of constraints can you include in a column definition? |
|
- NOT NULL constraints
- UNIQUE constraints
- PRIMARY KEY constraints
- FOREIGN KEY constraints
- CHECK constraints
|
67. |
What are the differences between a column constraint and a table constraint? |
|
Both types of constraints are defined in the table definition. A column constraint is included with the column definition, and a table constraint is included as a table element, similar to the way columns are defined as table elements. |
68. |
Which SQL statement should you use to delete a column from an existing table? |
|
ALTER TABLE |
69. |
How does the HAVING clause differ from the WHERE clause? |
|
The HAVING clause is similar to the WHERE clause in that it defines a search condition. However, unlike the WHERE clause, the HAVING clause is concerned with groups, not individual rows. |
70. |
What two clauses are mandatory in an INSERT statement? |
|
INSERT INTO and VALUES |