Hi,

How could I do this insert/select?

create table category
(
  id     tinyint(4)  NOT NULL auto_increment,
  name   varchar(20) NOT NULL,
  parent tinyint(4)  NULL,
  primary key(id)
);

insert into category (name, parent) values('cc_1',null);
insert into category (name, parent) select 'cc_2a', id from category where
name = 'cc_1';

MySQL don't like the insert/select.

Thanks




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to