資料庫表中欄位類型有以下幾種:1.二進制數據類型binary、varbinary、image2.字符數據類型char,varchar和text3.unicode數據類型包括nchar,nvarchar和ntext4.日期。
- 情感問答
- 答案列表
sql 查詢欄位類型:sql語句查找欄位數據類型[朗讀]
可用兩種方法,一種是在microsoftsqlservermanagerstudio中的圖形介面查詢,另一種是語句查詢.方法1:1、使用microsoftsqlservermanagerstudio登錄資料庫。
select*intotb3from(selecta,b,c,d,efromtb1unionallselecta,b,c,d,efromtb2)tbx。
selectsys.objects.nameas表名,sys.columns.nameas列名,sys.types.nameas數據類型fromsys.objectsjoinsys.columnsonsys.objects.object_id=sys。
按理既然是日期型的欄位,那麼它的值也應該是日期型的,否則是存不進去的,既然有這樣的數據,那麼就建個函數吧,大概是這樣的.createorreplacefunctionisdate(pdatevarchar2)returnvarchar2isv_datedate;beginv_date:=to_date(pdate,'yyyy/mm/dd');return'true';exceptionwhenothersthenreturn'false';end;然後在你的語句中用就可以了select*fromtablewhereisdate(欄位)='false'。