insert into RoleAuth (role_id,auth_id) values(?,?)
第一个参数是固定的,假定‘10001’,第二个参数要由后面的查询得出,请问能嵌套吗?
select auth_id from Authority where mod_id='10001' and func_id='10001'
第一个参数是固定的,假定‘10001’,第二个参数要由后面的查询得出,请问能嵌套吗?
select auth_id from Authority where mod_id='10001' and func_id='10001'
from Authority
where mod_id='10001' and func_id='10001'
into 表
from 表2
where ********
select '10001' , auth_id from Authority where mod_id='10001' and func_id='10001'
select'10001',auth_id into RoleAuth from Authority where mod_id='10002' and func_id='10001'
这样,好像不对啊?主键是自增长的
将变量填入insert语句中
select ''/*如果是主键就空在这里*/ , auth_id from Authority where mod_id='10001' and func_id='10001'
into 表1
from 表2
where ********
适用于直接创建并插入新表insert into 表1(****)
select *****
from 表2
where *****
插入存在的表1