create table test(code nvarchar(20)) insert into test(code) select '11111111115' union all select '11111111112' union all select '11111111113' union all select '11111111114' union all select '11111111111'select * from test select * into test2 from test order by code asc delete from testinsert into test(code) select code from test2select * from testdrop table test2 drop table test
select convert(int,手机号码) from 表 order by 手机号码 或者select 手机号码 from 表 order by 手机号码
select * from tablename order by phoneNO
哦!明白了!再创建一个过渡表! 1:创建 new_table(与old_table 结构完全相同) 2: select * from old_table order by 手机号码 insert into new_table3:delete old_table
create table test(code nvarchar(20)) insert into test(code) select '11111111115' union all select '11111111112' union all select '11111111113' union all select '11111111114' union all select '11111111111'select * from test select * into test2 from test order by code asc -- 排序导入新表delete from test -- 删除以前的数据insert into test(code) select code from test2 -- 导入新表select * from testdrop table test2 drop table test
select '11111111115' union all select '11111111112' union all select '11111111113' union all select '11111111114' union all select '11111111111' 楼上大哥 这是什么意思啊?
insert into test(code)
select '11111111115' union all
select '11111111112' union all
select '11111111113' union all
select '11111111114' union all
select '11111111111'select * from test
select * into test2 from test order by code asc delete from testinsert into test(code)
select code from test2select * from testdrop table test2
drop table test
from 表
order by 手机号码
或者select 手机号码
from 表
order by 手机号码
1:创建 new_table(与old_table 结构完全相同)
2:
select * from old_table order by 手机号码
insert into new_table3:delete old_table
insert into test(code)
select '11111111115' union all
select '11111111112' union all
select '11111111113' union all
select '11111111114' union all
select '11111111111'select * from test
select * into test2 from test order by code asc -- 排序导入新表delete from test -- 删除以前的数据insert into test(code)
select code from test2 -- 导入新表select * from testdrop table test2
drop table test
select '11111111112' union all
select '11111111113' union all
select '11111111114' union all
select '11111111111'
楼上大哥
这是什么意思啊?