List:General Discussion« Previous MessageNext Message »
From:Jose de Leon Date:June 10 2000 1:50am
Subject:Problem with create table ... select syntax
View as plain text  
Please, what is wrong with the following CREATE TABLE ... SELECT statement?
I'm using MySQL 3.22.27 and the docs that came with the tarball say this
should work.  The select I'm using now is a simplified statement that works
fine by itself but doesn't work with the CREATE TABLE ... SELECT form.  The
error message from MySQL is:

Error: You have an error in your SQL syntax near 'select * from
ds6n3_invsn_com' at line 1

and the statement submitted is:

CREATE TABLE temp_start (id bigint(20) DEFAULT '0' NOT NULL
auto_increment,Acct_Session_Id varchar(32) NOT NULL,User_Name varchar(32)
NOT NULL,NAS_IP_Address varchar(32) NOT NULL,Acct_Status_Type varchar(32)
NOT NULL,Acct_Authentic varchar(32) NOT NULL,Calling_Station_Id varchar(32)
NOT NULL,NAS_Port_Type varchar(32) NOT NULL,Service_Type varchar(32) NOT
NULL,Framed_Protocol varchar(32) NOT NULL,Framed_IP_Address varchar(32) NOT
NULL,Acct_Session_Time bigint(20) DEFAULT '0' NOT NULL,Acct_Terminate_Cause
varchar(32) NOT NULL,Acct_Input_Octets bigint(20) DEFAULT '0' NOT
NULL,Acct_Output_Octets bigint(20) DEFAULT '0' NOT NULL,Tstamp int(11)
DEFAULT '0' NOT NULL,Dstamp datetime DEFAULT '0000-00-00 00:00:00' NOT
NULL,PRIMARY KEY (id),KEY Acct_Session_Id (Acct_Session_Id),KEY User_Name
(User_Name),KEY Dstamp (Dstamp),KEY NAS_IP_Address (NAS_IP_Address)) select
* from ds6n3_invsn_com



Thanks,

Jose de Leon
System Administrator
InVision Telecommunications
(209) 549-8800

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FAST Internet Access and no bull.
InVision DSL, www.invisiondsl.com



Thread
Problem with create table ... select syntaxJose de Leon10 Jun
  • Re: Problem with create table ... select syntaxcurt10 Jun
    • Re: Problem with create table ... select syntaxRalph Graulich10 Jun