Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: descibe tables in sqlcmd Date: Sun, 12 Jun 2011 20:32:29 +0200 Organization: Erland Sommarskog Lines: 21 Message-ID: References: <4a18753e-487c-4527-ac18-7c00f5e495e6@d1g2000yqm.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="DD6dU+BfJNjsjSP4/K/V7w"; logging-data="15121"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/dqlGzMyjeuvebotI4zSL/" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:ySEalv1NpbtU8dqclHAysAlTrV4= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:433 björn lundin (b.f.lundin@gmail.com) writes: > In other databases, the prompt-tool offers a way of doing dml/ddl > statements. > They usually have a way of describing objects in the db as well > I have not found that with sqlcmd yet. Try "EXEC sp_help 'tbl'". Which you can shorten to "sp_help tbl", as long as there is no schema component in the name. Although, Microsoft is moving away from the sp_helpxxx procedures, why new features may not be presented in these. Rather, MS thinks it better to query the catalog views directly. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx