tp→ |
Data types : INT,CHAR(55),NVARCHAR(55),BIT,FLOAT,DOUBLE,DECIMAL,DATE,DATETIME,MONEY ,NTEXT,VARBINARY,IMAGE,XML |
cn→ |
Constraints : IDENTITY(1,1),NOT NULL,UNIQUE,PRIMARY KEY,FOREIGN KEY,CHECK,DEFAULT,INDEX |
cdb→ |
CREATE DATABASE dbname; |
ddb→ |
DROP DATABASE dbname; |
bdb→ |
BACKUP DATABASE dbname TO DISK = filepath; |
ctb→ |
CREATE TABLE tablename; |
dtb→ |
DROP TABLE tablename; |
acl→ |
ALTER TABLE table_name ADD column_name datatype; |
mcl→ |
ALTER TABLE table_name ALTER column_name datatype; |
dcl→ |
ALTER TABLE table_name DROP column_name |
acn→ |
ALTER TABLE table_name ADD CONSTRAINT |
dcn→ |
ALTER TABLE table_name DROP CONSTRAINT |
ref→ |
REFERENCES tablename columname; |
sl→ |
SELECT * FROM table_name; |
ii→ |
INSERT INTO table_name (columns) VALUES() |
up→ |
UPDATE table_name SET Col = Val WHERE |
dl→ |
DELETE FROM table_name WHERE |
ind→ |
CREATE UNIQUE INDEX index_name ON table_name (column1,column2) ; |
view→ |
CREATE OR REPLACE VIEW [view_name] AS |
dview→ |
DROP [view_name]; |
pro→ |
CREATE PROCEDURE procudure_name @param AS |
xpro→ |
EXEC PROCEDURE procudure_name @param = value ; |
injoin→ |
INNER JOIN table2 ON table1.column_name = table2.column_name; |
ljoin→ |
LEFT JOIN table2 ON table1.column_name = table2.column_name; |
rjoin→ |
RIGHT JOIN table2 ON table1.column_name = table2.column_name; |
fjoin→ |
FULL OUTER JOIN table2 ON table1.column_name = table2.column_name; |