
CodePudding user response:
Stored procedure is not good, if the table have been built,Using dynamic SQL, take special field cursor, give to the variable,
Insert into table_ | | @ A (A, B, C)
Select A, B, C from emp
Where A=@ A
CodePudding user response:
Direct execution, if the agency table field structure is the same, can write so directly,INSERT INTO table B SELECT * FROM A specialty of the WHERE='art'.
INSERT INTO C table SELECT * FROM A specialty of the WHERE='sports';
CodePudding user response:
But I don't know what his specialty is ah, have to take a variableCodePudding user response: