Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesNewby question but can't find it myself. How can I get a file-description from a file / table ? eg. the decription must deliver the following info: Record nr. Field nr. Fieldname Field description Data type Lenght Decimals etc.... Can somebody please tell me what to do? Thanx MF
Post Follow-up to this messageIs this? Select * from information_schema.columns where table_name='yourTabl e' Madhivanan
Post Follow-up to this messageMadhivanan wrote: > Is this? > > Select * from information_schema.columns where table_name='yourTabl e' > > Madhivanan > Doesn't work, but thanx for the response.
Post Follow-up to this messageYou'll probably have to combine a few different things to get those details - check out sysobjects, syscolumns, object_name(), objectproperty(), columnproperty() and fn_listextendedprope rty() in Books Online. You could also have a look at the source for sp_help, which returns most of the items you're interested in. If you can't work out what you're looking for, I suggest you post a simple CREATE TABLE statement (or perhaps use to a table in the pubs database as an example), and show what your desired output would look like for that table - that will probably be clearer than a description. You might also want to clarify why Madhivanan's suggestion didn't work for you. Simon
Post Follow-up to this messageMadhivanan (madhivanan2001@gmai l.com) writes: > Is this? > > Select * from information_schema.columns where table_name='yourTabl e' Select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='yourTabl e' This matter with a case-sensitive collation. And the names in INFORMATION_SCHEMA is all in uppercase. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techin.../2000/books.asp
Post Follow-up to this messageThanx a lot all of you. I was looking in the Master db for these files, combining them will be difficult but I'll give it a try. TY Simon Hayes wrote: > You'll probably have to combine a few different things to get those > details - check out sysobjects, syscolumns, object_name(), > objectproperty(), columnproperty() and fn_listextendedprope rty() in > Books Online. You could also have a look at the source for sp_help, > which returns most of the items you're interested in. > > If you can't work out what you're looking for, I suggest you post a > simple CREATE TABLE statement (or perhaps use to a table in the pubs > database as an example), and show what your desired output would look > like for that table - that will probably be clearer than a description. > You might also want to clarify why Madhivanan's suggestion didn't work > for you. > > Simon >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread