色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

oracle中如何表存在先刪除后創(chuàng)建

錢良釵2年前12瀏覽0評論

oracle中如何表存在先刪除后創(chuàng)建?

如果是沒有權(quán)限的話,照這下面做就OK了:grant sysdba, dba, create session, create any table , create any view , create any index , create any procedure , alter any table , alter any procedure , drop any table , drop any view , drop any index , drop any procedure , select any table , insert any table , update any table , delete any table to test_data(數(shù)據(jù)庫用戶名);首先我覺得你的邏輯有問題,既然數(shù)據(jù)庫里面存在了表你就刪除,但是你卻把創(chuàng)建表的執(zhí)行代碼寫在了else 條件里面;那意思如果數(shù)據(jù)庫存在了你要?jiǎng)?chuàng)建的這張表,你的邏輯只是把它刪除,但是卻沒有創(chuàng)建。下面是我整理的代碼你看看:create or replace procedure createtable( tname varchar2)is v_createsql varchar2(400); v_dropsql varchar2(100); v_count number(9);begin v_createsql:='create table '||tname||'( a number(8) primary key, b varchar2(20))'; v_dropsql:='drop table '||tname||' cascade constraints'; select count(*) into v_count from user_tables where table_name=upper('java7'); if v_count>

0 then execute immediate v_dropsql; commit; end if; execute immediate v_createsql; commit;end;begin createtable('java7');end;-- select * from java7

java cascade,oracle中如何表存在先刪除后創(chuàng)建