- Create an object (table, view, stored procedure, function) command] CREATE TABLE / VIEW / Procedure / Function - Create Table Create Table TabTestVB (VBName Varchar (10), Value Numeric (10)) GOCREATE TABLE TABTESTVB1 (VBName VARCHAR (10), Value1 Numeric (10)) GO - Insert Data (two ways) Insert Into TabTestvb (VBName, Value) Select 'AAA', 123insert Into Tabtestvb1 (VBName, Value1) SELECT 'AAA', 456 INSERT INTO TABTESTVB (VBNAME, VALUE) VALUES ('BBB', 345) Insert Into TabTestvb1 (VBName, Value1) VALUES ('CCC', 1002) - Change Data Update TabTestVB SET VALUE = 798 WHERE VBNAME = 'AAA' - Association Change Update tabTestVB SET value = tabTestVB1.value1 FROM tabTestVB1 WHERE tabTestVB.VbName = tabTestVB1.VbName-- delete data dELETE tabTestVB WHERE VbName = 'AAA' - no TRUNCATE tABLE tabTestVB-- log deletion to delete data objects (tables, views, stored procedures, Function) Command DROP TABLE / VIEW / PROC / FUNCTION - Delete Table DROP TABTESTVB1 - Assignment Command SET - Define Variable Declare - Process Control Statement While ... Breakbegin ... Endif ... Else-- --1 ... 100 and declare @nn Numeric (3) declare @sum numeric (8) set @ nn = 1set @ SUM = 0WHILE @nn <= 100 begin set @ Sum = @ Sum @ nn set @ nn = @ Nn 1 endselect @sum - plus the conditions: When @ nn = 20, exit the loop (calculated 1 ... 19 and) declare @nn numeric (3) declare @sum numeric (8) set @ nn = 1set @ Sum = 0WHILE @nn <= 100 begin if @nn <> 20 --begin set @ Sum = @ Sum @ nn --End else --Begin Break --end set @ nn = @ nn 1 endselect @sum - global variable @@ rowcount - Return the number of rows affected by the upper statement Select '1'Union allSelect' 3'select @@ rowcount @@ Error - Returns the error code of the last executed Transact-SQL statement.