Hi @KShahzad-8722,
Welcome to microsoft TSQL Q&A forum!
Please try:
create procedure a_stu
as
SELECT *
INTO database.schema.table
FROM database.schema.table
--delete from database.schem.table
execute a_stu
The execute a_stu statement must be executed separately from other statements.
If you have any question, please feel free to let me know.
If the response is helpful, please click "Accept Answer" and upvote it.
Regards
Echo
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.