The error message
Skipping FOREIGN KEY constraint ‘%.*ls’ definition for temporary table. FOREIGN KEY constraints are not enforced on local or global temporary tables.
is a run time error message for all versions of SQL Server. Query will be executed but the part mentioned in the message will be left out. This message appears if we try to create a FOREIGN KEY constraint for a temporary table. To resolve the error message exclude the statement for creating FOREIGN KEY constraint for a temporary table. It would not cause the statement to stop. But not all commands in your statement have been executed.