What is the use of a table datatype in SQL Server?
table datatype used for creating temporary tables which will be stored in tempdb database.
table datatype used for creating temporary in-memory tables which are useful for processing data as per business logic in stored procedures.
table datatype used for creating table variables in SQL.
second and third options are correct.
table data type used for creating table variables in SQL.
Table variables are almost same as temporary tables ( temporary tables are created in temp db database ) .
There are few differences between table variables and temporary tables . First difference is on tables which are created by using table data type we can apply only primary key , unique and not null constraints .
Second difference is tables created using table data type is created in RAM memory and will never go to any database . Once execution of current context where it is created is over , the table is deleted . But in case of temp tables , the tables will be created and stored physically in temp db database .
Back To Top