Ms Sql Server Cheat Sheet Pdf
Create a temporary view when before invoke before the event occurs after invoke after the event occurs event insert invoke for insert update invoke for update delete invoke for delete trigger type for.
Ms sql server cheat sheet pdf. Download the sql cheat sheet print it out and stick to your desk. Dba cheat sheet sqlservermama page 1 server info hardware info database info recovery model backup backup device restore sql agent jobs training info. Sql facts sql stands for structured query language sql is pronounced sequel sql is declarative language sql is used to access manipulate data in databases top sql dbs are ms sql server oracle db2 and mysql sql commands categories data query language dql select retrieve data from table s. This 3 page sql cheat sheet provides you with the most commonly used sql statements.
Sql aggregate functions avg returns the average of a list create temporary view v as select c1 c2 from t. From sql for dummies 9th edition. Sp help objname n product model returns general info about the object select serverproperty productlevel current value is sp1 select serverproperty edition standard edition 64 bit select version microsoft sql server 2008 r2 sp1 10 50. This cheat sheet consists of several helpful tables and lists containing information that comes up repeatedly when working with sql.
With this we come to an end of sql commands cheat sheet. Declare and set varibales declare mojo int set mojo 1 select mojo column from table where id 1 if else if else statement if mojo 1 begin print mojo is. Select afc case number as case number count afc case number as ctotal aetc event entry id aee event entry desc as event description aee event entry typ id as event type. View table usage tables referenced by views exec sys.
In one place you can get a quick answer to a number of different questions that frequently arise during an sql development effort. Sql server cheat sheet. Sql variant decimal money numeric real timestamp text ntext image table xml. A cheat sheet for microsoft sql server.
Dateparts year quarter month day of year day week hour minute second millisecond yy yyyy qq q mm m dy y dd d wk ww hh mi n ss s ms create a stored procedure create procedure name variable as datatype value as comments.