SQL语句问题,高手帮忙!!
将一个表21~30删除,sql语句怎么写
这个太笼统了,是排序后的第21条到30条记录删除还是某一列值在21到30之间的删除啊?
21-30是什么意思?字段的话就delete from table1 where col1>=21 and col1<=30
指的是第几条记录的话
delete from table1 where rowid in
(select rd from (
select rowid rd,rownum rn from table1)
where rn>=21 and rn<=30)
学习。。。
delete from table1 where rn in
(
select rn
from
(
select row_number() over(partition by ??(你要排序的字段) rn order by rowid
from table1
)
where rn>=21 and rn <=30
)
up
相关问答:
本人c#新手 可是要求要用c# ,sql2000开发c/s的工作流,一头雾水,请大家帮忙帮忙,给点思路,说的约具体越好,我也好往那个方面去学习
http://www.hxzi.com/view/61402.html
B/S版的,基本思想应该差不多的。。 ......
data a b c d e tag
2009-11-01 11 ......
表1:
col1 col2
a a.1
b b.1
......
sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and xxfwzf <>0 ),执行速度慢的要死,但是如果把(xxf>0 and ......