List:General Discussion« Previous MessageNext Message »
From:BobSharp Date:April 12 2009 1:54pm
Subject:Newbie ... Schema details listing
View as plain text  
I have written a .cfm to output a listing of columns with Name, Format, Size, NULL, KEY,

One thing I need to include is whether the Primary Key is  AUTO_INCREMENT 
That element does not appear to be in the same SCHEMA table.

Where is it ?   and   How can I use it with this Query ...  ?

<CFQuery datasource="bs3578" name="pColumns" >
     SELECT  COLUMN_NAME  AS  pCname, 
             DATA_TYPE  AS  pDtype, 
             IS_NULLABLE  AS  pISnull, 
             COLUMN_DEFAULT  AS  pCdefault, 
             COLUMN_TYPE  AS  pCtype,
             COLUMN_KEY  AS  pCkey,
             NUMERIC_SCALE  AS  pNscale,     
             NUMERIC_PRECISION  AS  pNprec
     WHERE   TABLE_NAME = "Products"  AND  TABLE_SCHEMA = "bs3578";     

I am using the free version of SPAMfighter.
We are a community of 6 million users fighting spam.
SPAMfighter has removed 12962 of my spam emails to date.
Get the free SPAMfighter here:

The Professional version does not have this message

Newbie ... Schema details listingBobSharp12 Apr
  • RE: Newbie ... Schema details listingMartin Gainty12 Apr