Insert into one column by selecting another column in other table but how fill the second column

Viewed 85134

i have a table which has two columns i'd fill one of the columns by selecting other table column data but how can i fill the next column cause i can't use VALUE. Here's the code

INSERT INTO Numbers(number, val) SELECT LaptopID FROM Laptop WHERE Laptop.Pid = 2 

as you can see the "val" column left empty how can i fill that?

7 Answers
INSERT INTO answer(userans) VALUES(OptionA) Select username From answer WHERE username= 'Name';

I want to add a data in a column with reference to another column in the same table.

INSERT INTO Numbers(number, val) SELECT LaptopID, '"+yourlabel.Text+"' FROM Laptop WHERE Laptop.Pid = 2

Related