偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

教您如何獲取SQL字段默認(rèn)值

數(shù)據(jù)庫 SQL Server
sql server中的字段默認(rèn)值的獲取方法未必人人都會,下文對獲取SQL字段默認(rèn)值的方法進(jìn)行了詳細(xì)的闡述說明,供您參考學(xué)習(xí)。

sql server 中,如何獲取SQL字段默認(rèn)值呢?下面就為您介紹實現(xiàn)該功能的方法,如果您遇到過類似的問題,不妨一看,希望對您有所幫助。

sql server 中獲取SQL字段默認(rèn)值 ,獲取所有的默認(rèn)值列表:

  1. select   
  2. object_name(c.id) as 表名  
  3.  ,c.name as 字段名  
  4.  ,t.name as 數(shù)據(jù)類型  
  5.  ,c.prec as 長度  
  6.  ,p.value as 字段說明  
  7.  ,m.text as 默認(rèn)值  
  8. from syscolumns c  
  9.  inner join  
  10.  systypes t  
  11.  on c.xusertype=t.xusertype  
  12.  left join   
  13.  sysproperties p  
  14.  on c.id=p.id and c.colid = p.smallid  
  15.  left join  
  16.  syscomments m  
  17.  on c.cdefault=m.id 

研究了很久 終于搞定了

獲取單個SQL字段默認(rèn)值列表

  1. select   
  2. object_name(c.id) as 表名  
  3.  ,c.name as 字段名  
  4.  ,t.name as 數(shù)據(jù)類型  
  5.  ,c.prec as 長度  
  6.  ,p.value as 字段說明  
  7.  ,m.text as 默認(rèn)值  
  8. from syscolumns c  
  9.  inner join  
  10.  systypes t  
  11.  on c.xusertype=t.xusertype  
  12.  left join   
  13.  sysproperties p  
  14.  on c.id=p.id and c.colid = p.smallid  
  15.  left join  
  16.  syscomments m  
  17.  on c.cdefault=m.id  
  18. where objectproperty(c.id,'IsUserTable')=1  
  19.  and object_name(c.id) = 'T_good' and c.name = 'ishot'   

 

 

【編輯推薦】

SQL修改字段默認(rèn)值

同一列SQL字符串相加的方法

教您如何修改sql server時間

SQL Server時間算法大全

SQL Server SA權(quán)限小技巧

責(zé)任編輯:段燃 來源: CSDN博客
相關(guān)推薦

2010-09-28 10:23:36

SQL修改字段

2010-09-07 16:05:23

SQL語句刪除

2010-11-25 14:49:08

MySQL查詢最大值

2010-09-24 16:52:18

sql DATENAM

2010-09-28 11:28:40

SQL字段屬性

2010-09-26 13:56:43

SQL遠(yuǎn)程查詢

2010-10-21 14:06:22

定義SQL Serve

2010-09-27 16:48:07

sql server時

2010-10-08 10:37:00

MYSQL添加新字段

2021-02-25 13:40:17

MySQL數(shù)據(jù)庫默認(rèn)值

2010-09-28 15:24:43

sql語句

2010-07-15 10:37:15

SQL Server默

2010-09-24 18:47:23

SQL數(shù)據(jù)分頁

2010-10-21 16:59:37

SQL Server創(chuàng)

2010-10-19 16:58:34

SQL Server日

2010-10-21 16:59:37

SQL Server創(chuàng)

2010-09-16 15:48:03

SQL Server系

2010-09-10 09:55:13

SQL參數(shù)變量

2010-09-17 13:35:30

SQL跨表更新

2010-09-27 16:32:46

SQL Server日
點贊
收藏

51CTO技術(shù)棧公眾號