MySQL Forums
Forum List  »  Newbie

Table Insert Question
Posted by: Robert Clark
Date: February 13, 2009 09:51PM

I have the following query:

DROP TABLE IF EXISTS harbor_layout;
CREATE TABLE harbor_layout (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,dock CHAR(60));
INSERT INTO harbor_layout VALUES (1,' ');
INSERT INTO harbor_layout
SELECT dock, Concat(float_num,' : ',permanent_assignee, ' *',temporary_assignee )
FROM harbor_layout, harbor
Order by
harbor.id asc;

The query works fine, but I really don't want to execute the first insert,

INSERT INTO harbor_layout VALUES (1,' ');

If I take the above line out of the query, the query still runs but it doesn't insert the subsequent concatenated rows into the new table. What's going on with this?


Thank you!

Options: ReplyQuote


Subject
Written By
Posted
Table Insert Question
February 13, 2009 09:51PM
February 18, 2009 01:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.