T-SQL 基本语法
新 增 、 修 改 、 删 除 、 查 询
insert 、update、delete、select
方式一
--新增一条记录到 tb
insert into tb(name,tel) values('jia','18888888888')
--修改名称,把jia 替换为 ajia
update tb set name = 'ajia' where name='jia'
--删除所有记录
delete * from tb
--查询所以 tb 表的数据
select * form tb
方式二
--新增
insert into tb select 'a','123123123' union all
select 'b','154123123' union all
select 'c','146234234'
--修改表tb ,根据表 tb1
update tb set name = tb1.name from tb,tb1 where tb.tel = tb1.tel
--删除没有日志
truncate table tb