The following are the types of Tables that can be created in SQL.
1. USER TABLES (REGULAR TABLES)
Figure 6.1. Table ProductLists has been successfully created
The CREATE TABLE statement in SQL is used to create a new user defined table table.
2. TEMPORARY TABLES
Temporary tables can be created to save the execution time. They are however only for a session that created them. After execution of another session they automatically get destroyed. They are identified by prefix #. We can create many temp tables in a single stored procedure.
Figure6.2 Table #ProductList has been successfully created
Note: A Database consists of a collection of huge volumes of data, so make sure that you have proper Admin access before dropping a Database. A dropped Database cannot be recreated and it may lead to loss of all the stored data.
3.GLOBAL TEMPORARY TABLES
Global temporary tables are available to all sessions and all users. They are however terminated automatically when the last session using the temporary table has completed. They are identified with the prefix ##.
Figure6.2 Table ##GlobalTable has been successfully created
Want More SQL Deep Dives