狠狠色丁香婷婷综合尤物/久久精品综合一区二区三区/中国有色金属学报/国产日韩欧美在线观看 - 国产一区二区三区四区五区tv

LOGO OA教程 ERP教程 模切知識(shí)交流 PMS教程 CRM教程 開發(fā)文檔 其他文檔  
 
網(wǎng)站管理員

Sqlserver2005 Sqlcmd查看數(shù)據(jù)庫/表/字段的命令

admin
2013年4月2日 22:11 本文熱度 4424


Sqlcmd是sqlserver自帶的命令行工具,可以在不打開企業(yè)管理器的時(shí)候訪問本地或者遠(yuǎn)程的數(shù)據(jù)庫,對(duì)數(shù)據(jù)庫進(jìn)行管理。



Sqlcmd連接數(shù)據(jù)庫:sqlcmd -S 10.78.1.99 -U sa -P sa


C:/Users/1232>sqlcmd -S 10.78.1.99 -U sa -P sa
1>


 


1.查詢數(shù)據(jù)庫
select name from master.dbo.sysdatabases


1> select name from master.dbo.sysdatabases
2> go
name
---------------------------------------------------------
master
tempdb
model
msdb
pubs
Northwind
COMMON_SECURITY
FlowEng
LTS
SUNDB
UTL
(11 行受影響)


 


2.查詢數(shù)據(jù)庫中的表
select name from sysobjects where xtype='U'


1> use master
2> go
已將數(shù)據(jù)庫上下文改為 'master'。
1> select name from sysobjects where xtype='U'
2> go
name
------------------------------------------------------
spt_monitor
spt_values
spt_fallback_db
spt_fallback_dev
spt_fallback_usg
dtproperties
spt_provider_types
aofax_send_task
aofax_recv_task
FAXRECV
Pboc
spt_datatype_info_ext
MSreplication_options
spt_datatype_info
spt_server_info


(15 行受影響)



3.查詢表中的列
select c.name,c.length from syscolumns c inner join sysobjects t on c.id = t.id and t.name='spt_monitor'


1> select c.name,c.length from syscolumns c inner join sysobjects t on c.id = t.id and t.name='spt_monitor'
2> go
name                                                                                                                             length
-------------------------------------------------------------------------------------------------------------------------------- ------
lastrun                                                                                                                               8
cpu_busy                                                                                                                              4
io_busy                                                                                                                               4
idle                                                                                                                                  4
pack_received                                                                                                                         4
pack_sent                                                                                                                             4
connections                                                                                                                           4
pack_errors                                                                                                                           4
total_read                                                                                                                            4
total_write                                                                                                                           4
total_errors                                                                                                                          4


(11 行受影響)


 


至于怎么打印出表字段的類型這個(gè)可以連查systypes表。


該文章在 2013/4/2 22:11:41 編輯過
關(guān)鍵字查詢
相關(guān)文章
正在查詢...
點(diǎn)晴ERP是一款針對(duì)中小制造業(yè)的專業(yè)生產(chǎn)管理軟件系統(tǒng),系統(tǒng)成熟度和易用性得到了國(guó)內(nèi)大量中小企業(yè)的青睞。
點(diǎn)晴PMS碼頭管理系統(tǒng)主要針對(duì)港口碼頭集裝箱與散貨日常運(yùn)作、調(diào)度、堆場(chǎng)、車隊(duì)、財(cái)務(wù)費(fèi)用、相關(guān)報(bào)表等業(yè)務(wù)管理,結(jié)合碼頭的業(yè)務(wù)特點(diǎn),圍繞調(diào)度、堆場(chǎng)作業(yè)而開發(fā)的。集技術(shù)的先進(jìn)性、管理的有效性于一體,是物流碼頭及其他港口類企業(yè)的高效ERP管理信息系統(tǒng)。
點(diǎn)晴WMS倉(cāng)儲(chǔ)管理系統(tǒng)提供了貨物產(chǎn)品管理,銷售管理,采購(gòu)管理,倉(cāng)儲(chǔ)管理,倉(cāng)庫管理,保質(zhì)期管理,貨位管理,庫位管理,生產(chǎn)管理,WMS管理系統(tǒng),標(biāo)簽打印,條形碼,二維碼管理,批號(hào)管理軟件。
點(diǎn)晴免費(fèi)OA是一款軟件和通用服務(wù)都免費(fèi),不限功能、不限時(shí)間、不限用戶的免費(fèi)OA協(xié)同辦公管理系統(tǒng)。
Copyright 2010-2025 ClickSun All Rights Reserved