日期:2014-05-18 浏览次数:20494 次
select top 50 * from hpx insert into hpx (theksh,thexm) values ('100','张三') update hpx set theflag= 0 where theksh ='2432430001000203' delete hpx where theksh = 100 select count(*) from hpx where theflag= 1 select * from hpx where thetime <'2010-09-19 22:36:49' select * from hpx order by thetime select count(*) from hpx select * from hpx where thexm like '%李' update hpx set theksh = '0' + cast(theksh as varchar(100)) select theksh,thexm,case when thesocer < 60 then 'C' when thesocer < 80 then 'B' when thesocer >= 80 then 'A' end select top 0 'X1' as x1,'X2' as x2,'X3' as x3 into newtab from Sys_User
------解决方案--------------------
create table hpx ( theksh varchar(20), thexm nvarchar(20), thetime datetime, theflag varchar(10), thesocer varchar(10) ) 1. select top 50 * from hpx; 2. insert into hpx(theksh,thexm) values(100,N'张三'); 3. insert into hpx(theksh) values('2432430001000203'); update hpx set theflag='0' where theksh='2432430001000203'; 4. delete from hpx where theksh='100' 5. select count(1) [扫描总人数] from hpx where theflag='1' 6. select * from hpx where thetime<'2010-09-19 22:36:49' 7. select * from hpx order by thetime 8. select count(1) [总人数] from hpx 9. select * from hpx where thexm like '李%' 10. update hpx set theksh='0'+theksh 11. select theksh,thexm,thesocer, case when thesocer < 60 then 'C' when thesocer < 80 then 'B' when thesocer >= 80 then 'A' end from hpx