数据表某列统一在数据前面添加固定数字 select '00'+rtrim(字段名) from 表 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 create table tb(id int)insert into tb select 1insert into tb select 2insert into tb select 3insert into tb select 4insert into tb select 5insert into tb select 6insert into tb select 7insert into tb select 8insert into tb select 9select '00'+ltrim(id) as id from tb 001002003004005006007008009 update tb set id = '00'+id--id的数据类型应该为varchar 先建立一个tid 字段 varchar类型然后用 update tb set tid ='00'+id看看tid 是否正确正确的话,删除id字段更改tid字段名为id 求前100条记录id字段的最小值(不能用order by,要用min函数) 求查询视图数据然后插入另外的一个表中的 存储过程 重复数据、保留一条。请问如何操作? SQL语句问题,详情请进 请教个问题,感谢 自定义函数使用变量的问题。 mysql 语句。很头大。 OpenRowSet 在局域网中实现对DBF文件导入导出的问题?解决就给分 请问如何用odbc将excel导入sqlserver呀? 求助一个简单的存储过程语句,求大神指点 关于table变量的问题 高手请进,数据汇总查找
insert into tb select 1
insert into tb select 2
insert into tb select 3
insert into tb select 4
insert into tb select 5
insert into tb select 6
insert into tb select 7
insert into tb select 8
insert into tb select 9select '00'+ltrim(id) as id from tb 001
002
003
004
005
006
007
008
009
--id的数据类型应该为varchar
然后用
update tb set tid ='00'+id看看tid 是否正确正确的话,删除id字段更改tid字段名为id