我有3个sql语句, 第一个将生成1列ID#和约2000行,
例如:
select Field1
from xyz
where xxxx ='0'
group by Field1
order by field1 asc
OFFSET 1 ROWS
我想获取每一行的值,并使用此ID#
执行另一个select语句select lId
from xyz
where b ='0'
and field1 = 'here the value from the first statement '
order by lId ASC
总是产生1列和2行,我想取这两行并在update语句中插入第一行,在update stamen的where子句中插入第二行 然后运行delete语句删除第二行
update abc
set luid = 'first value'
where lUsId = 'second value'
delete
from xyz
where lId ='<second value>'
请帮助我