Vivek's SQL Notes
Archives: January 2012
SQL Server- Output clause
2 comments, 738 reads
Posted in Vivek's SQL Notes on 22 January 2012
CTE command In Sql Server
Common table expression (CTE):- Common table expression or CTE can be described as the temporary, named record set return by the execution of the query (insert, delete, update, select or update view statement). It is not stored as an object in the database and it last only till the execution…
7 comments, 1,553 reads
Posted in Vivek's SQL Notes on 17 January 2012
SQL Server-Table Variable
4 comments, 1,353 reads
Posted in Vivek's SQL Notes on 7 January 2012
SQL Server - Local temporary table
Local temporary table:- Local temporary table is created in the tempdb and it is visible to the current user's session only. It remains exists till the current user session is connected. Once the user connection is disconnected it gets destroyed. Since the local temporary table is created in the tempdb,…
0 comments, 1,173 reads
Posted in Vivek's SQL Notes on 7 January 2012
SQL Server - Global temporary tables
Global temporary table:- Global temporary table is created in the tempdb and it is visible to all other sessions as well. Global temporary tables are only destroyed when the current user disconnected and all the sessions referring to it closed. It means no user sessions refers it. Since the global temporary table is…
6 comments, 3,963 reads
Posted in Vivek's SQL Notes on 7 January 2012
How to remane a Table in Sql Server
SP_RENAME 'old table name', 'New table name'
For example, if we want to rename the table from employee to employeemaster, following command can be used.
SP_RENAME 'employee', 'employeemaster'
This command will rename the table from employee to employeemaster.
0 comments, 445 reads
Posted in Vivek's SQL Notes on 2 January 2012
How to change the database collation
0 comments, 617 reads
Posted in Vivek's SQL Notes on 2 January 2012



Subscribe to this blog