Fixed length string
Variable length string that takes the following arguments:
Binary Large Objects
Integer
Float (number with decimal point)
Double
Numeric type that takes the following argument:
Currency type
Addition
Unary positive, makes number positive
Subtraction
Unary negative, makes number negative
Multiplication
Division
Modulo (remainder of division)
Increment
Decrement
Equals
a+=b is a=a+b
a-=b is a=a-b
a*=b is a=a*b
a/=b is a=a/b
a%=b is a=a%b
a&=b is a=a&b
a|*=b is a=a|b
a^-=b is a=a^b
Is equal to
Is not equal to
Greater than
Less than
Greater than or equal to
Less than or equal to
Bitwise AND
Bitwise OR
Bitwise XOR
Add a column to a table
Represents all records of a SELECT statement
ALL(selectstatement);
Returns TRUE if all subquery values separated by AND are TRUE
Represents some record of a SELECT statement
ANY(selectstatement);
Returns TRUE if the operand is within the range of comparisons
Returns TRUE if the subquery returns one or several records
Returns TRUE if the operand is equal to one of a list of expressions
IN(selectstatement);
Returns TRUE if the operand matches a pattern with wildcards
Displays a record if the condition(s) is NOT TRUE
Returns TRUE if at least one of the subquery values separated by OR is TRUE
Returns TRUE if at least one of the subquery meets the condition
Returns TRUE if record doesn't have a null value
Denotes a column originating from a table
Denotes all columns
Declares end of a block
Declares a function
Declares a string
Multiple character wildcard; represents zero or more characters (MS Access only)
Multiple character wildcard; represents zero or more characters (SQL Server only)
Single character wildcard; Represents a single character (MS Access only)
Single character wildcard; Represents a single character (SQL Server only)
Represents any single character within the brackets
Represents any single character within the specified range
Represents any character not in the brackets (MS Access only)
Represents any character not in the brackets (SQL Server only)
Selects tables or columns
Removes duplicate records in a SELECT statement
SELECT DISTINCT column FROM table;
Denotes the table for a SELECT statement
Denotes an alias for a column or table name
WHERE condition;
Orders records in ascending or descending order
Ascending order
ORDER BY ASC;
Descending order
ORDER BY DESC;
Returns results from multiple SELECT statements with an equal column count
Limits the amount of records shown in a SELECT statement
Writes query to file
Selects a database to query to
Shows databases or tables
Alters a database table's columns
Updates a database table's column values based on a condition
Creates a database
Creates a table
Deteles a database
Creates a database
CREATE DATABASE database;
Deletes a database
CREATE DATABASE database;
Creates a table
CREATE TABLE table
(column1 datatype, columnn datatypen);
Deletes a table
Groups results based on different values of a certain column
Filtering condition applied to a column mentioned in a GROUP BY statement. Note that this key word is only present in GROUP BY statements
GROUP BY column HAVING condition;
Sets a variable
Denotes a case statement
CASE
WHEN condition1 THEN result1
WHEN condition2 THEN result2
WHEN conditionN THEN resultN
ELSE result
END
Denotes a condition for a CASE
Denotes an action for a CASE
Declares a primary key constraint
Declares a constraint that ensures the values for this field are not null
Declares a constraint that ensures the values for this field meet a custom condition
Increments value for each new record
Declares a foreign key constraint
Removes a column
Matches values with a pattern including wildcards
Adds specific quality for a column
CONSTRAINT constraintname constraintword
Used to connect a column to a foreign key in another table
Returns the common values of two tables based on a certain column condition
table1 INNER JOIN table2 ON joiningCondition
Returns values in the left table based on a certain column condition between two tables
Returns values in the right table based on a certain column condition between two tables
Returns values in the left table based on a certain column condition between two tables
table1 LEFT OUTER JOIN table2 ON joiningCondition
Returns values in the right table based on a certain column condition between two tables
table1 RIGHT OUTER JOIN table2 ON joiningCondition
Performs cartesian product on two tables (in other words, displays records where each element in table A is listed besides each element in table B)
table1 CROSS JOIN table2;
Appends record with listed columns to a table
INSERT INTO table(column1, column2, columnN)
VALUES (column1value, column2value, columnNvalue);
Used for denoting values being inserted into a column
Creates a view; a view is a virtual table based on an SQL query
CREATE VIEW viewname AS viewstatement;
DELETE FROM table WHERE condition;
Returns the smallest value of the selected column
Returns the largest value of the selected column
Returns the amount of rows that meet a criteria
Returns the modulo of two numbers
Returns π
Returns an alternate value if a record's column is NULL (MySQL only)
Returns an alternate value if a record's column is NULL (SQL Server only)
Returns TRUE if a record's column is NULL (MS Access only)
Used to tell compiler the rest of this line is not to be compiled
Opens a multi line comment
/*This isn't compiled
neither is this line*/
Closes a multi line comment
/*This isn't compiled
neither is this line*/