Correct Answer: PL/SQL tables are scalar arrays that can be referenced by a binary digit They can be used to store values for later queries and calculations
5. Difference between a query and a statement in SQL?
Correct Answer: An SQL statement is a string of characters that conforms to the syntax and format specified in the international standard A query is a statement that returns a record-set
6. State one similarity and difference between WHERE Clause and HAVING Clause?
Correct Answer: Similarity: Both WHERE and HAVING Clause filters out records based on one or more conditions Difference: WHERE Clause can only be applied to a static non-aggregated column whereas HAVING is needed for aggregated columns
7. What are defaults? Is there a column to which a default can?t be bound?
Correct Answer: A default is a value which will be used by a column, if no value is supplied to that column while inserting data Yes, IDENTITY and TIMESTAMP columns are free from the bounds of default
8. What are constraints? Mention the different types of constraints?
Correct Answer: Constraints enable the RDBMS to enforce the integrity of the database automatically, without the need to create triggers, rule or defaults Types of Constraints: NOT NULL, CHEQUE, UNIQUE, PRIMARY KEY, FOREIGN KEY
9. What is the difference between a primary key and a unique key?
Correct Answer: - A clustered index is a special type of index that reorders the way records in the table are physically stored Therefore table can have only one clustered index The leaf nodes of a clustered index contain the data pages - A non clustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk The leaf node of a non clustered index does not consist of the data pages Instead, the leaf nodes contain index rows