Reputation: 27
I'm working on a project in which i need to insert data from one table to another along with another value, lets say I have table1(col1,col2,col3) and i have table2(col2) so i wrote the following:-
INSERT INTO table1 (col1,col2) VALUES ((@constant),(SELECT col2 FROM table2))
How to do that knowing that @Constant
is a parameter that has a value used inside a stored procedure?
Upvotes: 0
Views: 52