17,382
社区成员




--oracle(3楼我少了个逗号)
insert into a(codename,oper,addtime) select codename, 'admin',sysdate from b where code=10 and rownum = 1
另:你的mssql写法也是错的.应该为:
insert into a(codename,oper,addtime) select top 1 codename ,'admin',getdate() from b where code=10