SQL DELETE Statement: SQL Create Database Statement: SQL Drop Database Statement: SQL USE Statement: SQL COMMIT Statement: SQL ROLLBACK Statement
SQL DELETE Statement: SQL Create Database Statement: SQL Drop Database Statement: SQL USE Statement: SQL COMMIT Statement: SQL ROLLBACK Statement
columnN=valueN
[ WHERE CONDITION ];
TUTORIALS POINT
Simply Easy Learning
CHAPTER
S QL data type is an attribute that specifies type of data of any object. Each column, variable and expression
You would use these data types while creating your tables. You would choose a particular data type for a table
column based on your requirement.
SQL Server offers six categories of data types for your use:
Tinyint 0 255
Bit 0 1
TUTORIALS POINT
Simply Easy Learning
Date and Time Data Types:
DATA TYPE FROM TO
Note: Here, datetime has 3.33 milliseconds accuracy where as smalldatetime has 1 minute accuracy.
TUTORIALS POINT
Simply Easy Learning
Maximum length of 231 bytes (SQL Server 2005 only). ( Variable length Binary
varbinary(max)
data)
Stores values of various SQL Server-supported data types, except text, ntext, and
sql_variant
timestamp.
Stores a database-wide unique number that gets updated every time a row gets
timestamp
updated
Stores XML data. You can store xml instances in a column or a variable (SQL Server
xml
2005 only).
TUTORIALS POINT
Simply Easy Learning
CHAPTER
SQL Operators
What is an Operator in SQL?
A n operator is a reserved word or a character used primarily in an SQL statement's WHERE clause to
Operators are used to specify conditions in an SQL statement and to serve as conjunctions for multiple conditions
in a statement.
Arithmetic operators
Comparison operators
Logical operators
a + b will
+ Addition - Adds values on either side of the operator
give 30
a - b will
- Subtraction - Subtracts right hand operand from left hand operand
give -10
a * b will
* Multiplication - Multiplies values on either side of the operator
give 200
b / a will
/ Division - Divides left hand operand by right hand operand
give 2
b % a will
% Modulus - Divides left hand operand by right hand operand and returns remainder
give 0
TUTORIALS POINT
Simply Easy Learning