Re: create tmp table of column list of a table for future use

2002-04-05 Thread Alex Behrens
I believe it has to be like this: create table column_list (MYTABLE_NAME DESC); Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ:

RE: create tmp table of column list of a table for future use

2002-04-05 Thread hong chen
-Original Message- From: hong chen Sent: Friday, April 05, 2002 5:32 PM To: 'Alex Behrens' Subject: RE: create tmp table of column list of a table for future use No luck. Oracle and Sql Server have system tables to check. mysql desc ATTRIBUTES;

RE: create tmp table of column list of a table for future use

2002-04-05 Thread Gurhan Ozen
Are you trying to create a new table with an existing table's structure only ? or with the structure and data? If you just wanna duplicate a table with the data inside it you can use CREATE TABLE .. SELECT ... syntax. More info is at: http://www.mysql.com/doc/C/R/CREATE_TABLE.html IF you just

RE: create tmp table of column list of a table for future use

2002-04-05 Thread hong chen
-Original Message- From: hong chen Sent: Friday, April 05, 2002 5:50 PM To: 'Gurhan Ozen' Subject: RE: create tmp table of column list of a table for future use I am trying to check if a certain column exists before I try to select it from the table. in Oracle or Sql Server I would:

RE: create tmp table of column list of a table for future use

2002-04-05 Thread hong chen
Problem is I'm accessing mysql through scripting against a table that may or may not have ID field, select count(*) from (desc ATTRIBUTES) where Field ='ID'; if count(*) 0 then select ID from ATTRIBUTES; else do something else; end if; -Original Message- From: Gurhan Ozen