| sql server 中查詢表或列是否存在
					當前位置:點晴教程→知識管理交流
					
					→『 技術(shù)文檔交流 』
					
				 
 sql server 中查詢表或列是否存在確定表是否存在 1. 使用系統(tǒng)視圖: sys.tables select name from sys.tables where name = ' tablaName' and type = 'u' type = 'u' 是排除存儲過程和視圖及系統(tǒng)表等,指的是用戶表User_Table。 2. 使用系統(tǒng)視圖:sysobjects    xtype = 'u' 是排除存儲過程和視圖及系統(tǒng)表等,指的是用戶表User_Table。 確定列是否存在 1 假設(shè)表為aaa,要添加的字段是name字段.    ------------------------------------------------------------------------------------------------------------------------------- 注意; EntityManager em=super.getEntityManager(AppConfig.PERSISTENCE_CENT); 對 getSingleResult() Throws:  該文章在 2011/9/20 11:04:07 編輯過 | 關(guān)鍵字查詢 相關(guān)文章 正在查詢... |