SQL
SQL
Page 1
⇒ Explain with an example: full outer join, left outer join, right outer join.
Page 2
The Inconsistent Data Problem
The Phantom Insert problem.
⇒ What are deadlocks?
⇒ What is Shared and Exclusive locks.
⇒ Explain the different locking level.
Chapter: Views.
⇒ How could usage of views on table in the database help in enforcing security?
⇒ What are views and how are they different from base tables?
⇒ What are updatable and non updatable views?
⇒ What are the advantages of views?
⇒ How are views created and deleted?
⇒ What is the significance of using CASCADE and RESTRICT options in the DROP VIEW
statement?
⇒ What are the different types of views?
⇒ What is the use of WITH CHECK OPTION clause in the view definition?
State whether the following statements are TRUE or FALSE. Justify your
answer.
Page 3
• Columns names can be compared in the WHERE clause of SELECT statement.
• Each query in UNION operation can have an ORDER BY clause.
• The expressions A UNION (B UNION ALL C) is always equivalent to (A UNION B)
UNION ALL C.
• By default the ORDER BY clause sorts the query result in descending order.
• Individual queries in the UNION operation can be multitable queries.
• Sub queries cannot be nested within other sub queries.
• Sub queries cannot appear in the HAVING clause.
• Sub queries cannot be nested in the WHERE clause.
• INTERSECT operation, by default retains duplicate values.
• A SELECT query by default retains duplicate values.
• A WHERE clause by default with eliminate duplicate rows of data.
• An INSERT statement can only insert one row at a time.
• DELETE operation can delete select data from specific columns of a table.
• Single DELETE statements can wok only on one row at a time.
• It is possible to update all the existing rows in a table with a single UPDATE statement
• A sub query can appear in the INSERT statement.
• If all the rows of a table are deleted, the table structure is also deleted.
• Two columns of a table cannot have same domain.
• One table can draw its data form another table.
• Only one table name can appear in the FROM clause of the DELETE statement.
Page 4