Re: Create a row, use id as value in another row?
Sorry for got to add the code....
CREATE TABLE test (
id INT(6) AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL,
parentID INT(6)
)
INSERT INTO `test` (`name`, `parentID`) VALUES
('child',
INSERT INTO `test` (`name`) VALUES ### subquery to insert a row. The id field from this will be used as the parentID value of the main query.('top');
);
Don
Subject
Views
Written By
Posted
1500
December 22, 2015 08:35PM
Re: Create a row, use id as value in another row?
832
December 22, 2015 08:36PM
752
December 22, 2015 08:52PM
663
December 23, 2015 09:44PM
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.