- 博客(5)
- 收藏
- 关注
转载 更新并复制到新表
select * into #tt from #t where 年=2011 update #t set 年=2102 inset into #t select * from #tt
2012-01-14 10:06:09
403
转载 SQL Server精度数据(decimal和numeric)在算术运算时的自动转换规则
SELECT CAST (124131.28*1.57/100 AS DECIMAL(18,4)) SELECT CAST(1948.86[b]11[/b]*100/1.57 AS DECIMAL(18,4)) 结果为:(无列名)1948.8611 (无列名)124131.2803 假定运算数分别为@d1(精度为p1,小数位数为s1),@d2(精度为p
2012-01-14 10:01:08
3554
转载 查询语句
select * from 商品 where( (商品类别=1) or (商品类别=2) or (商品类别=3) or (商品类别=6)) 商品类别指的是粮食,五金,电子,蔬菜,水果,等等这样的类别 create table test(id int identity(1,1),col varchar(100)) insert into test(col) select top 1
2012-01-14 09:58:00
352
转载 SQL 常用语句
1、说明:复制表(只复制结构,源表名:a 新表名:b) (Access可用) 法一:select * into b from a where 1 法二:select top 0 * into b from a 2、说明:拷贝表(拷贝数据,源表名:a 目标表名:b) (Access可用) insert into b(a, b, c) select d,e,f from b; 3、说
2012-01-13 09:50:05
306
转载 两个表左连接取数只取一行
我有两个表 a id time 1 2011-12-22 10:45:01.000 2 2011-11-22 10:45:01.000 3 2011-12-22 10:45:01.000 b id time 1 2011-12-22 10:45:01.000 1 2011-11-22 10:45:01.000 2 2011-02-22 10:45:01.000 2 201
2012-01-12 17:34:51
1888
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅