Professional Documents
Culture Documents
III. What do you understand by View in sql and how you will create?
Views can be considered as virtual tables. Generally speaking, a table has a set of definition, and it physically
stores the data. A view also has a set of definitions, which is build on top of table(s) or other view(s), and it
does not physically store the data.
The syntax for creating a view is as follows:
CREATE VIEW "VIEW_NAME" AS "SQL Statement";
IV. Which data type VARCHAR or int better to store unique id in sql and why?
An int is usually better because it gives better performance.
It is faster and uses less storage on the database.