Re: query to list field data types
From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 04/19/04
- Next message: Hugo Kornelis: "Re: => Trigger to split Trailer Loads"
- Previous message: David Hepburn III: "query to list field data types"
- In reply to: David Hepburn III: "query to list field data types"
- Next in thread: Vishal Parkar: "Re: query to list field data types"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Apr 2004 21:27:42 +0200
On Mon, 19 Apr 2004 10:04:25 -0700, David Hepburn III wrote:
>
>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
Hi David,
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Customers'
Best, Hugo
-- (Remove _NO_ and _SPAM_ to get my e-mail address)
- Next message: Hugo Kornelis: "Re: => Trigger to split Trailer Loads"
- Previous message: David Hepburn III: "query to list field data types"
- In reply to: David Hepburn III: "query to list field data types"
- Next in thread: Vishal Parkar: "Re: query to list field data types"
- Messages sorted by: [ date ] [ thread ]
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) - retrieve table properties through query?
... 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.setup) - 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)