Create database db001;
--Create a table
Create Table Job (
ID char (TEN) not null,name char (100) is not null,address Char
);
--Delete Table
drop table jobtable2;
--Inserting values
Use db0001
Go
Insert into job values (' 1 ', ' 2 ', ' 3 ');
INSERT into job values (' 2 ', ' 2 ', ' 2 ');
--Inserting values
Use db001
INSERT into job values (' 2 ', ' 2 ', ' 2 ');
INSERT into job values (' 10001 ', ' zhangsan ', ' sex ');
--Create a table
CREATE TABLE CJTB (id char), name char (30), sex char
);
--Inserting values
INSERT into CJTB values (' 10002 ', ' zhangsan ', ' sex ')
INSERT into CJTB values (' 10003 ', ' zhangsan ', ' sex ')
INSERT into CJTB values (' 10004 ', ' zhangsan ', ' sex ');
Insert into CJTB (id,name,sex) VALUES (' 10005 ', ' Lisi ', ' sex ');
--Modifying values
UPDATE CJTB SET name = ' Wangmazi ' WHERE id = ' 6 ';
--Enquiry Form
SELECT * from CJTB;
--Create a view
CREATE VIEW V_customer
As SELECT ID, name, sex
From CJTB;
This article is from the "technical Daniel help you take care of" blog, please be sure to keep this source http://zhaoshilei.blog.51cto.com/6455149/1925101
SQL Server Statement command