Thanks Brad.   I remember doing stuff like this a few years ago, but I
couldn't remember where to look.  Perfect.

On 7/10/07, Brad T Comer <[EMAIL PROTECTED]> wrote:
> Here are a couple queries that you might find useful to get you started;
> assuming you are using SQL Server 2k or greater:
>
> <cfquery name="qTables" datasource="dsn">
>    SELECT   *
>    FROM     INFORMATION_SCHEMA.TABLES
>    ORDER BY table_name
> </cfquery>
> <cfquery name="qColumns" datasource="dsn">
>    SELECT   *
>    FROM     INFORMATION_SCHEMA.COLUMNS
>    WHERE    table_name = '#tablename#'
> </cfquery>
> <cfquery name="qColumnConstraints" datasource="dsn">
>    SELECT   *
>    FROM     INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
>    WHERE    TABLE_NAME = '#tablename#'
> </cfquery>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2862
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to