卖逼视频免费看片|狼人就干网中文字慕|成人av影院导航|人妻少妇精品无码专区二区妖婧|亚洲丝袜视频玖玖|一区二区免费中文|日本高清无码一区|国产91无码小说|国产黄片子视频91sese日韩|免费高清无码成人网站入口

oracle存儲(chǔ)過(guò)程日期加1 如何判斷SQL中是否已經(jīng)存在某表,存儲(chǔ)過(guò)程,函數(shù)等?

如何判斷SQL中是否已經(jīng)存在某表,存儲(chǔ)過(guò)程,函數(shù)等?1、是否存在某表的判斷if exists(select 0 from sysobjects where name="表名" and xtype="U

如何判斷SQL中是否已經(jīng)存在某表,存儲(chǔ)過(guò)程,函數(shù)等?

1、是否存在某表的判斷

if exists(select 0 from sysobjects where name="表名" and xtype="U") begin --存在 end

2、是否存在某存儲(chǔ)過(guò)程的判斷

if exists(select 0 from sysobjects where name="存儲(chǔ)過(guò)程名" and xtype="P")begin --存在end

3、是否存在某函數(shù)的判斷

if exists(select 0 from sysobjects where name="函數(shù)名" and xtype="FN")begin --存在end

oracle存儲(chǔ)過(guò)程中,如果用if語(yǔ)句判斷一條查詢語(yǔ)句的結(jié)果集是否為空?

已經(jīng)經(jīng)過(guò)測(cè)試,可以。create table test1023(id int) --創(chuàng)建測(cè)試表 test1023declare cnt intbeginselect count(*) into cnt from test1023if cnt=0 theninsert into test1023 values("1")commitend ifend