目录
1、使用SQL语言插入记录
use [construction monitor database]
insert into 应力测点 values ('2018-01-01','A1-1','267096',2315.7,2805.7,-1.2)
insert into 应力测点 values ('2018-01-01','A1-2','265119',2280.0,-202.9,-2.2)
insert into 应力测点 values ('2018-01-01','A1-3','265091',2431.3,-9.3,-1.4)
insert into 应力测点 values ('2018-01-01','A1-4','265085',2427.1,-73.0,-1.0)
insert into 应力测点 values ('2018-01-08','A1-1','267096',2320.3,2810.3,0.7)
insert into 应力测点 values ('2018-01-08','A1-2','265119',2291.2,-191.7,-0.4)
insert into 应力测点 values ('2018-01-08','A1-3','265091',2452.5,11.9,-1.2)
insert into 应力测点 values ('2018-01-08','A1-4','265085',2417.7,-63.6,2.1)
2、复制一张表到另一张表(包括数据结构)
(1)目标表不存在
select * into 新表名 from 旧表名;
(2)目标表存在
insert into 新表名 select * from 旧表名;
3、删除表中所有数据
delete from 表名
4、读取第一行数据
select top 1 * from tablename