declare
v_count int;
begin
select count(*) into v_count from user_views
where view_name = '视图名';
if v_count > 0 then execute immediate 'drop view 视图名';
end;
/
v_count int;
begin
select count(*) into v_count from user_views
where view_name = '视图名';
if v_count > 0 then execute immediate 'drop view 视图名';
end;
/
要执行sql不知道怎么写。
请帮忙。
as
v_count int;
begin
select count(*) into v_count from user_views
where view_name = '视图名';
if v_count > 0 then execute immediate 'drop view 视图名';
end;
/
建立过程直接调用,
原因是在存储过程中由角色付与的权限会失效。
嗬嗬!
wiler(@_@) 的做法是没有问题的
而且象drop view viewname这样的语句直接执行的话如果没有此名称的视图就会抛异常的,代码并不健壮。