retrieve table properties through query?

From: David Hepburn III (null_at_null.com)
Date: 04/19/04


Date: Mon, 19 Apr 2004 17:13:45 GMT

Can anyone tell me if there's a query command that will
return information about a table's properties, such as
field names, field data types, field lengths, index names,
etc?

For example, I'm looking for output that would show the
following, if we queried the Customers table in the MS
Northwind SQL DB:

CustomerID, nchar, 5, nulls=no
CompanyName, nvarchar, 40, nulls=no
ContactName, nvarchar, 30, nulls=yes

etc...

Thanks!!!
David



Relevant Pages

  • query to list field data types
    ... field names, field data types, field lengths, index names, ... if we queried the Customers table in the MS ... ContactName, nvarchar, 30, nulls=yes ...
    (microsoft.public.sqlserver.mseq)
  • Re: query to list field data types
    ... >field names, field data types, field lengths, index names, ... if we queried the Customers table in the MS ... >ContactName, nvarchar, 30, nulls=yes ...
    (microsoft.public.sqlserver.mseq)
  • Re: How do you make a fixed length (85 characters) format report o
    ... I'm on the receiving end of ... such files from my customers. ... you might experiment with columns widths. ... > How did you define the specific field lengths? ...
    (microsoft.public.excel.misc)
  • Re: retrieve table properties through query?
    ... Look within Books Online (within your SQL Server program group) for more information. ... if we queried the Customers table in the MS ... > Northwind SQL DB: ... > ContactName, nvarchar, 30, nulls=yes ...
    (microsoft.public.sqlserver.setup)
  • nvarchar in crecordset
    ... In my "Customers" table, I have some fields in "nvarchar" type. ... It seems that the "DBVT_STRING" is not the correct type for ... How should I fix the problem? ...
    (microsoft.public.sqlserver.programming)