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
相关问答:
with adod_dict do
begin
close;
commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......
例如有2个表 一个是员工信息表 表里有名字 工资等字段 一个是公司财务表有 每月总支出等字段
现在要给一个员工涨工资 500RMB 就要写2条 UPDATE语句(假设只有两张表。实际肯定要更多)
问:如何 ......
data a b c d e tag
2009-11-01 11 ......
表1:
col1 col2
a a.1
b b.1
......
我EXCEL中一个单元格的数据如 "2009-01","8949-232"
将这个数据粘贴到PL/SQL中的一个表中后,数据确是成为了 2009-01,8949-232 ,把所有的""都没了,
如何弄呢?请大家试 ......