--记得 in后面的查询语句一定要打括号,不然的话,就会提示报错
BEGIN
for customerFollowTableCursor in
(SELECT s.table_name tableName from user_tables s
where s.TABLE_NAME LIKE 'T_BC_CUSTOMERFOLLOW%' AND s.TABLE_NAME <> 'T_BC_CUSTOMERFOLLOW')
loop
dbms_output.put_line(customerFollowTableCursor.tableName);
end loop;
end parttablecustomerfollowProc;
create or replace procedure parttablecustomerfollowProc
asBEGIN
for customerFollowTableCursor in
(SELECT s.table_name tableName from user_tables s
where s.TABLE_NAME LIKE 'T_BC_CUSTOMERFOLLOW%' AND s.TABLE_NAME <> 'T_BC_CUSTOMERFOLLOW')
loop
dbms_output.put_line(customerFollowTableCursor.tableName);
end loop;
end parttablecustomerfollowProc;
本文详细解释了在SQL中正确使用IN查询语句的方法,包括括号的必要性、语法细节以及实例演示。
2340

被折叠的 条评论
为什么被折叠?



