INSERT INTO multiple rows with subquery
问题 I want to INSERT INTO by more than one value at a time, I did this by doing the following: INSERT INTO table_1(col_1,col_2,col_3) SELECT col_1, col2, (SELECT col3 FROM table_3) FROM table_2 But col3 from table_3 is a datetime format, while col3 from table_1 needs an integer value. I did this by doing the following: CAST(CONVERT(varchar(10),(SELECT col3 FROM table_3),112)AS int) When I run this I get a more than one result in a subquery error. I have really no idea whatsoever on how to fix