SQL INTERVIEW QUESTION & ANSWERS
146. |
What is the difference between table and view? |
|
Table: - Stores the data in the database on the disk drive.
- Uses a lot of disk space for a large table.
- The data belongs to the table.
- The data in a table is stable and does not change by itself.
View :- Stores the select statement that defines the view. It has no data of its own.
- Uses very little disk space.
- The data does not belong to the view. It belongs to the table used in the select statement that defines the view.
- The data in a view is dynamic and changes when the data in the underlying tables is changed.
|
147. |
What is the difference between a HAVING CLAUSE and a WHERE CLAUSE? |
|
Having Clause with the GROUP BY function in a query and WHERE Clause is
applied to each row before, they are part of the GROUP BY function in a query. |
148. |
Define Equi Join? |
|
A Equi Join is a join in which the join comaparison operator is an equality. i.e., when two tables are joined together using equality of values in one or more columns they make an Equi Join. |
149. |
Define Cartesian Join? |
|
Cartesian join which combines every row in one table with every row in another table. |
150. |
Define Outer Join? |
|
A outer join is a method for intentionally retrieving selected rows from one table that doesn’t match rows in the other table. |