Thursday, 4 October 2007

SQL Server How To

following questions have been asnwered in the link
Add a column to a table unless it already exists
Count the total number of records in all user tables
Create a table unless it already exists
Create a temporary table
Create a view unless it already exists
Create an index unless it already exists
Determine the name of the database you are connected to
Determine the name of the user for the current session
Determine which service pack is installed
Export data to a comma separated file
Import data from a comma separated file
List all currently connected users
List all columns in a table
List all databases
List all indexes on a table
List all filegroups
List all tables
List all tables or indexes within a filegroup
List all tables that contain a given column name
List the size of each table in the database
List table information
Move a database file
Obtain record field size information
Restore an NT4 system and SQL Server 7 databases from a full backup
Restore a W2K system and SQL Server 2000 databases from a full backup
Run dbcc checkdb on each database (using cursors)
Script a full NT4 and SQL Server 7 backup
Script a full W2K and SQL Server 2000 backup
Set a single database into Single User Mode
SQL Server Replication
Start SQL Server 2000 in Single User Mode
Test if a trigger exists

No comments: