oracle刪除已存在的表的實例建站知識
導讀:1建站知識查詢系統表,判斷表是否存在,存在則直接刪除網站seo優化診斷工具網站seo優化培訓。
Sql代碼
復制代碼 代碼如下:
select count(*) from user_objects where object_name=upper(p_table_name); select count(*) from user_tables where table_name=upper(p_table_name); create or replace procedure p_drop_tabl網seo優化趨勢e_if_exist_v1( p_table_name in varchar2 ) is v_count number(10); begin select count(*網站seo優化培訓) into v_count from user_objects where object_name=upper(p_table_name); if v_count 如何seo優化推廣網站> 0 then execute immediate 'drop table ' || p_table_name || ' purge'; end if; exception when no_data_found then begin null; end; end; / create or replace procedure p_drop_table_if_exist_v2( p_table_name in varchar2 ) is v_table_name varchar2(20); begin select table_name into v_table_name from user_tables where table_name=upper(p_table_name); if length(v_table_name)>0 then execute immediate 'drop table ' || p_table_name || ' cascade constraints'; end if; exception when no_data_found then begin null; end; end; /
相關網站seo優化診斷工具網站seo優化培訓。聲明: 本文由我的SEOUC技術文章主頁發布于:2023-05-24 ,文章oracle刪除已存在的表的實例建站知識主要講述實例,存在,oracle刪除已存在的表的實例建站知識網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_6232.html