首页 > 专家说

在sql serve中下面关键字怎么用,请举个小例子'add','alter','all','any','as

来源:新能源网
时间:2024-08-17 13:17:11
热度:

在sql serve中下面关键字怎么用,请举个小例子add,alter,all,any,as【专家解说】:create table #test(code varchar(36),n

【专家解说】:create table #test(code varchar(36),num int) --all用法 insert into #test select newid(),1 union all select newid(),20 union all select newid(),28 union all select newid(),15 select * from #test --alter add用法 alter table #test add name varchar(30) ----any用法,类似 in关键字 select * from #test where num > any(select num from #test) --as asc用法 select code,num,name as colname from #test order by num asc drop table #test