i am copying 2 column from a source table to target.
issue is when i selecting 2 column values and and trying to inserting to target table, i am getting below error.any idea?
Msg 512, Level 16, State 1, Line 27
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
INSERT INTO destinationtable(firstname,lastname,age,school)
SELECT
(SELECT sourcetable.firstname From sourcetable),
(SELECT sourcetable.lastname From sourcetable),19,UP school

Jenith ThakkarRank #789 · 2.9K reputationPosted Jul 23, 2020, 9:10 PM EDT
then please check this
Shivangi RajdeRank #609 · 3.9K reputationPosted Jul 23, 2020, 5:19 AM EDT