SQL INTERVIEW QUESTION & ANSWERS
81. |
What is the difference between a conditional statement and a compound statement? |
|
A conditional statement determines whether a statement is executed based on whether a specified condition evaluates to true. A compound statement groups statements into a block. |
82. |
What is the difference between UNIQUE and PRIMARY KEY? |
|
The UNIQUE KEY column restricts entry of duplicate values but entry of NULL value is allowed. In case of PRIMARY KEY columns entry of duplicate as well as NULL value is also restricted. |
83. |
Which SQL statement executes the SELECT statement in a cursor? |
|
OPEN statement |
84. |
What is referential integrity? |
|
A value that appears in one relation for a given set of attributes also appears for a certain set of attributes in another relation. |
85. |
What is a Trigger? |
|
Triggers are a special type of stored procedure, which gets invoked upon a certain event. They can be performed upon an INSERT, UPDATE and DELETE. |