sql2000 使用查詢列出,表的字段型別

2021-05-18 08:03:21 字數 383 閱讀 7981

select

col.[name]  as '欄位名',

col.[length]as '長度'  ,

type.[name] as '型別'  ,

pro.value   as '描述' 

from syscolumns as col

left join systypes as type on col.xtype = type.xtype

left join sysproperties as pro on col.id = pro.id and col.colid = pro.smallid

where col.id = (select id from sysobjects where name = 'hb_zb_gj11')

SQL2000表分組問題

現sql2000伺服器上有一張表,格式如下 檔案內容 檔案組 1 a2 a 3 a4 b 5 c6 d 7 e8 e 9 f要實現將表內容更新為 檔案內容 檔案組 a1 a 2 a3 a b4 b c5 c d6 d e7 e 8 ef 9 f意思是將分組資訊直接加在檔案內容之中?如果不用游標,不知...

sql2000臨時表分頁

if exists select from dbo.sysobjects where id object id n temp and objectproperty id,n isusertable 1 drop table temp create table temp pager2011 id in...

sql2000 游標的使用

一般情況下游標的使用應遵循以下5個步驟 1.宣告游標 2.開啟游標 3.從游標讀取行,並有選擇地進行處理 4.關閉游標 5.釋放游標 use pubs 宣告變數 declare title varchar 100 price smallmobey 宣告游標 declare price cursor ...