Download as pdf
Download as pdf
You are on page 1of 1
Za, SOUID nny DIGICORP Peratin tere Pd SQL Server Cheat Sheet SQLAUTHORIY DRIER oer ORES Tne | Bray Snes | ooh | RR "ype conversion Saline acne | Be mont tnsetNimercs | oa id A ll aa ear eesti) = = va iscellanecus | $SM52005 > salve, COVERT atte, exresion) oi Slimony | Stings satiny | Car Sects oars fe forox Numerics | chr ee Sevan | QectBromer 78 ‘tinyint float varchar Unicode Strings | table Full Screen -> Shift + alt + Enter oe Bo Varcartmes)| near Seay te tvarcarimen) | St (FURERORSTN] © neruace | ten Primary Key SELECT statement ete | QUOTENANE | SN ALTERTABLE AOD SELECT [DIETING [OP int | TOP int PERCENT magente | TEE oe Sanaa sw NS coposun| REE | SORT Pr KEY CLUSTERED ce snare ca now aN (Clu ts) stent, es Greercin ave BRM | ate ears tne (LEP 1 RUG | FULL3f OUTER 20M coun sou ceroare ee tite ce bid STR prt retahl CONSTRAINT (ON table_source.primairy_key = GROUPING STUFF padre DEFAULT (") FOR {ColumnName) table_source?.foreign_keyl[,...n]_ sn Soo [WHERE search_condition} MIN iviccore ‘YEAR (date) Foreign Key GROUP BY group_by_expression] su UNICODE” DATEADD (teat, rumber, ALTER THE abet» wr cage {ROU BY ai. oer oa 400 CONSTRAINT costae? [oR BY ode. expreson [ASC | DESC eve athematiat | ATEDET Getepa san, end) | Aah neuer) on wae a DaTENANE iateors date) | REFERENCES Seated” (tablezco2>) whe fae Stren eon) ‘ject operation Cursor ‘sin Datepart ‘T-SQL Statements ened ENE nora Soctrson rows A, corlenters errr name> 1S a Sererensrarus | Sa Sinner ga ee eiison stars reer ane Viows cen SEF coun. pame = expres | = ES Day of Year "> @y, y : CREATE VIEW cname> {() AS = De ‘dd, d DEFAULT | NULL} [,...n] ‘ ya ser cr Da [MERE seen eon can becress > i CHARINDEX oP Hour > fi | DELETE Statement tole een “ ON tabie> ra i Second > oo Pee eel FoR nsesT, UPDATE, DELETE 23s statement> a tooo INSERT statement Fumctions INSERT TO} Table. name CREATE FUNCTION name fee oa fe ore [(cotumn_tist)) RETURNS wera RIDING ALTER TABLE tablename>OROP |, a Pane mx ALTER TABLE staberame? DROP. vais ((OEFAULT | MULL | AS BEEN cl Stement> caren Toe) RETURN sl oxpreon 10 ‘www. digheorp.com "© Copyright 2000-2000 Pinal Dave. all Rights Reserved. SQLAuthority.com

You might also like