📄 增删改.sql
字号:
select * from customers
go
insert customers
(CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,Country,Phone,Fax)
values
('PECOF','Pecos Coffee Company','Michael Dunn','Owner','1900 Oak Street','Vancouver','Bc','V3f 2k1','Canada'
,'(604) 555-7293')
go
create table a
(cutomerid tinyint not null primary key,
name varchar(10) not null,
age tinyint default(20),
)
go
create table b
(custid tinyint not null primary key,
name varchar(10) not null,
age tinyint default(20)
)
go
drop table a
go
insert a
select custid,name,age from b
go
select * from a
go
select productname as products,unitprice as price,(unitprice*1.1) as tax
into #pricetable
from products
go
/*新建窗口,在另外窗口键入代码“select * from #pricetable ”不能看见本地临时表*/
select * from #pricetable
go
select productname as products,unitprice as price,(unitprice*1.1) as tax
into ##pricetable
from products
go
/*新建窗口,在另外窗口键入代码“select * from ##pricetable ”就能看见全局临时表*/
select * from shippers
go
exec sp_help shippers
go
select identitycol from shippers
go
insert shippers(companyname)
values('Fitch & Mather')
go
update b
set age=age*2
go
delete b
where age=44
go
select * from b
go
delete b
from
exec sp_help_fulltext_catalogs
go
exec sp_help_fulltext_tables
go
exec sp_help_fulltext_columns
go
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -