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版的,基本思想应该差不多的。。 ......
with adod_dict do
begin
close;
commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......
因为是多客户端操作的,所以希望在更新的时候,可以把表用排他锁锁住,其他用户不可以查询和修改
之前看到相关问题里面提到 WITH (XLOCK) ,我这里可以用这个吗?
WITH (XLOCK) 用完之 ......
前几天公司面试,见到一题,请高手帮我解答,谢谢!
内容table:
id name parentid
1 aaa null
14 bbb 1
......