導航:首頁 > 編程大全 > sql判斷資料庫表是否存在

sql判斷資料庫表是否存在

發布時間:2023-07-09 01:53:43

① 如何使用sql語句判斷一個資料庫是否已經存在

1.資料庫
if exists(select 1 from master..dbo.sysdatabases where name='example')
print 'DataBase existed'
else
print 'Database not existed'
2.表
IF Exists(Select 1 From sysObjects Where Name ='表名專屬' And Type In ('S','U'))
Print 'Exists Table'
Else
Print 'Not Exists Table'

閱讀全文

與sql判斷資料庫表是否存在相關的資料

熱點內容
Xvp格式文件 瀏覽:728
vb程序執行順序 瀏覽:648
小班編程學什麼 瀏覽:267
獲取文件頁數 瀏覽:140
系統文件夾移動 瀏覽:764
在哪裡查找誤卸載的文件 瀏覽:778
音王inandon歌庫版本 瀏覽:892
16k聘書內容文件 瀏覽:738
itools密碼怎麼找回 瀏覽:668
s7200項目文件路徑 瀏覽:473
電腦桌面文件的存放路徑 瀏覽:836
想學軟體編程哪個培訓學校比較好 瀏覽:748
wps手機版儲存的文件在哪裡 瀏覽:747
電商統計數據哪個好 瀏覽:90
魅族刪除的數據在哪裡 瀏覽:978
肖戰如何學習編程 瀏覽:40
哪裡數據線便宜 瀏覽:549
清理QQ文件微信也被清理 瀏覽:106
微信每天產生多少t數據 瀏覽:379
帶宏程序怎麼編程 瀏覽:359

友情鏈接