You are here: 首頁 arrow 討論區
  • Decrease font size
  • Default font size
  • Increase font size
Table \'.\docean\jos_fb_whoisonline\' is marked as crashed and should be repaired SQL=INSERT INTO jos_fb_whoisonline (`userid` , `time`, `what`, `task`, `do`, `func`,`link`, `userip`, `user`) \n VALUES (\'0\', \'1586204233\', \'將 MSSqlServer 的整個資料結構編成一個Table\',\'\',\'\',\'view\',\'/index.php?option=com_fireboard&func=view&catid=5&id=12&Itemid=26\', \'\', \'0\')
歡迎, 訪客
登入註冊.    遺失密碼?
將 MSSqlServer 的整個資料結構編成一個Table (0 人正在瀏覽) 
Warning: Invalid argument supplied for foreach() in C:\AppServ\www\components\com_fireboard\template\default\fb_pathway.php on line 140
前往最底 張貼回覆 我的最愛: 0
主題: 將 MSSqlServer 的整個資料結構編成一個Table
Charlies (用戶)
Fresh Boarder
文章: 5
用戶離線 點擊這裡檢閱此用戶的個人檔案
將 MSSqlServer 的整個資料結構編成一個Table 10 年, 10 個月 之前 聲譽: 0  
不過要留意的是:資料庫內不可以有名為 DBDescript 的 Table.

drop table DBDescript;

select TB.[name] as TableName,FD.[name] as FieldName,Type.[name] as Type,FD.length,null as memo
into DBDescript
from syscolumns FD
left join sysobjects TB on
left join systypes Type on Type.xtype=FD.xtype
where TB.xtype’s’
order by TB.[name],FD.[name];

drop table DBPrimaryKey;

select TB.[name] as TableName,PK.[name] as PKName,COL.[name] as ColumnName
into DBPrimaryKey
from sysobjects TB
left join sysobjects PK on PK.xtype=’PK’ and
left join sysindexkeys IND on
left join syscolumns COL on and IND.colid=COL.colid
where TB.xtype=’U';
舉報給版主   已登入 已登入  
前往最頂 張貼回覆
Powered by FireBoard