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
2. 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
3. Write an SQL Query to find employees whose name starts with an ?M??
Correct Answer: Trigger allows us to execute a batch of SQL code when an insert, update or delete command is executed against a specific table Triggers are special types of stored procedures that are defined to execute automatically in place of or after data modifications They can be executed automatically on the insert, delete and update operation
Correct Answer: Recursive query can be create in SQL using stored procedure but you can also use CTE (Common table expression) It might be also worth asking about performance as CTE is not always very fast
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
10. 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