Data type
varchar (8000): Supports up to 8,000 characters
nvarchar (4000): Supports up to 4,000 characters
Integral type
Floating point Type
Operators, functions
ISNULL (value,0); --if NULL, the return value is 0sum (column); --Add this column value IsNumeric ("123")--non-numeric return 0, number returned 1
modifying fields
ALTER TABLE tname DROP COLUMN cname; --delete field alter TABLE tname ADD CNAME VARCHAR (100); --Add the field alter TABLE tname add DEFAULT (' no ') for the CNAME with VALUES; --Modify the field default value
SELECT statement
Go heavy
SELECT DISTINCT cname from tname WHERE ...;
Result set Query
SELECT * from Tname WHERE the CNAME in (' V1 ', ' v2 ');
If the result set is empty
SELECT * from Tname WHERE cname in ('); --cannot be written as in (), so there is a syntax error.
External connection
Outer joins are divided into three kinds: Left outer connection, right outer connection, full outer connection
This article is from the "Zero Technology Road" blog, please be sure to keep this source http://zerohou.blog.51cto.com/3019528/1615326
SQL Server-Basic