SQL Server 2005 database commands list

 

 

 

 

 

 

 

CREATE AGGREGATE
 DROP AGGREGATE
 CREATE APPLICATION ROLE
 ALTER APPLICATION ROLE
 DROP APPLICATION ROLE
 CREATE ASSEMBLY
 ALTER ASSEMBLY
 DROP ASSEMBLY
 ALTER AUTHORIZATION
 b
 BACKUP
 BACKUP CERTIFICATE
 BCP Bulk Copy
 BEGIN [DIALOG [CONVERSATION]]
 c
 ALTER CERTIFICATE
 CREATE CERTIFICATE
 DROP CERTIFICATE
 CHECKPOINT
 DBCC CHECKALLOC Check consistency of disk allocation.
 DBCC CHECKCATALOG Check catalog consistency
 DBCC CHECKCONSTRAINTS Check integrity of table constraints.
 DBCC CHECKDB Check allocation, and integrity of all objects.
 DBCC CHECKFILEGROUP Check all tables and indexed views in a filegroup.
 DBCC CHECKIDENT Check identity value for a table.
 DBCC CHECKTABLE Check integrity of a table or indexed view.
 DBCC CLEANTABLE Reclaim space from dropped variable-length columns.
 COMMIT
 CREATE CONTRACT
 DROP CONTRACT
 CREATE CREDENTIAL
 ALTER CREDENTIAL
 DROP CREDENTIAL
 d
 CREATE DATABASE
 ALTER DATABASE
 DROP DATABASE
 DBCC HELP Help for DBCC commands
 DBCC deprecated commands
 DBCC Undocumented commands
 DBCC dllname Unload a DLL from memory
 DECLARE
 CREATE DEFAULT
 DROP DEFAULT
 DELETE
 DENY Object permissions
 DENY User/Role permissions
 DBCC DROPCLEANBUFFERS Remove all clean buffers from the buffer pool.
 e
 CREATE ENDPOINT
 ALTER ENDPOINT
 DROP ENDPOINT
 CREATE EVENT NOTIFICATION
 DROP EVENT NOTIFICATION
 EXECUTE
 EXECUTE AS
 EXISTS Test for the existence of rows
 f
 DBCC FREE... CACHE Remove items from cache
 CREATE FULLTEXT CATALOG
 ALTER FULLTEXT CATALOG
 DROP FULLTEXT CATALOG
 CREATE FULLTEXT INDEX
 ALTER FULLTEXT INDEX
 DROP FULLTEXT INDEX
 CREATE FUNCTION
 ALTER FUNCTION
 DROP FUNCTION
 g
 GO
 GRANT Object permissions
 GRANT User/Role permissions
 i
 IF Conditionally execute T-SQL statements.
 CREATE INDEX
 ALTER INDEX
 DROP INDEX
 DBCC INPUTBUFFER Display last statement sent from a client to a database instance.
 INSERT
 iSQL -U user -P password -i script.sql -o logfile.log
 k
 CREATE KEY ASYMMETRIC / SYMMETRIC
 ALTER KEY ASYMMETRIC / SYMMETRIC
 DROP KEY ASYMMETRIC / SYMMETRIC
 OPEN KEY SYMMETRIC /
 CLOSE KEY SYMMETRIC
 KILL
 KILL QUERY NOTIFICATION
 KILL STATS JOB
 l
 CREATE LOGIN
 ALTER LOGIN
 DROP LOGIN
 m
 CREATE MASTER KEY
 ALTER MASTER KEY / ALTER SERVICE MASTER KEY
 BACKUP MASTER KEY / BACKUP SERVICE MASTER KEY
 DROP MASTER KEY
 RESTORE MASTER KEY / RESTORE SERVICE MASTER KEY
 CREATE MESSAGE TYPE
 ALTER MESSAGE TYPE
 DROP MESSAGE TYPE
 O
 DBCC OPENTRAN Display information about recent transactions
 DBCC OUTPUTBUFFER Display last statement sent from a client to a database instance
 p
 CREATE PARTITION FUNCTION
 ALTER PARTITION FUNCTION
 DROP PARTITION FUNCTION
 CREATE PARTITION SCHEME
 ALTER PARTITION SCHEME
 DROP PARTITION SCHEME
 CREATE PROCEDURE
 ALTER PROCEDURE
 DROP PROCEDURE
 DBCC PROCCACHE Display information about the procedure cache
 q
 CREATE QUEUE
 ALTER QUEUE
 DROP QUEUE
 r
 CREATE REMOTE SERVICE BINDING
 ALTER REMOTE SERVICE BINDING
 DROP REMOTE SERVICE BINDING
 RESTORE DATABASE Complete
 RESTORE DATABASE Partial
 RESTORE DATABASE Files
 RESTORE LOGS
 RESTORE DATABASE_SNAPSHOT
 RESTORE FILELISTONLY (List data/log files)
 RESTORE HEADERONLY (List backup header info)
 RESTORE LABELONLY (Media info)
 RESTORE REWINDONLY (Rewind and close tape device)
 RESTORE VERIFYONLY
 REVERT
 REVOKE Object permissions
 REVOKE User/Role permissions
 CREATE ROLE
 ALTER ROLE
 DROP ROLE
 ROLLBACK
 CREATE ROUTE
 ALTER ROUTE
 DROP ROUTE
 s
 CREATE SCHEMA
 ALTER SCHEMA
 DROP SCHEMA
 SELECT
 SEND
 SERVERPROPERTY
 CREATE SERVICE
 ALTER SERVICE
 DROP SERVICE
 SESSION_USER
 SESSIONPROPERTY
 SET @local_variable
 SET
 DBCC SHOW_STATISTICS Display the current distribution statistics
 DBCC SHRINKDATABASE Shrink the size of the database data and log files.
 DBCC SHRINKFILE Shrink or empty a database data or log file.
 SHUTDOWN
 ADD SIGNATURE
 DROP SIGNATURE
 DBCC SQLPERF Display transaction-log space statistics. Reset wait and latch statistics.
 CREATE STATISTICS
 UPDATE STATISTICS
 DROP STATISTICS
CREATE SYNONYM
 DROP SYNONYM
 t
 CREATE TABLE
 ALTER TABLE
 DROP TABLE
 TRUNCATE TABLE
 BEGIN DISTRIBUTED TRANSACTION
 DBCC TRACE... Enable or Disable trace flags
 BEGIN TRANSACTION
 COMMIT TRANSACTION
 CREATE TRIGGER
 ALTER TRIGGER
 ENABLE TRIGGER
 DISABLE TRIGGER
 DROP TRIGGER
 CREATE TYPE
 DROP TYPE
 u
 UNION
 UPDATE
 DBCC UPDATEUSAGE Report and correct page and row count inaccuracies in catalog views
 DBCC USEROPTIONS Return the SET options currently active
 CREATE USER
 ALTER USER
 DROP USER
 USE
 v
 CREATE VIEW
 ALTER VIEW
 DROP VIEW
 x
 CREATE XML SCHEMA COLLECTION
 ALTER XML SCHEMA COLLECTION
 DROP XML SCHEMA COLLECTION