Description
Description
Using Go to Definition (F12) on an existing stored procedure opens its definition as:
CREATE PROCEDURE dbo.ExistingProcedure
Because the procedure already exists, executing this script fails. An editable definition should use:
ALTER PROCEDURE dbo.ExistingProcedure
Steps to Reproduce
Steps to reproduce
- Connect a SQL document to a database.
- Write or locate a reference to an existing stored procedure.
- Place the cursor on the procedure name.
- Press F12.
- Inspect the generated definition document.
Actual behavior
The generated document starts with CREATE PROCEDURE.
Expected behavior
The generated document should start with ALTER PROCEDURE, because the procedure already exists.
The same principle should apply to existing functions.
Affected Area
If you selected "Other", please describe the affected area
Go to Definition (F12) for existing stored procedures.
Environment Information
- OS: Windows
- MSSQL extension: 1.45.1
- VS Code version: 1.138
Confirmation
Description
Description
Using Go to Definition (F12) on an existing stored procedure opens its definition as:
Because the procedure already exists, executing this script fails. An editable definition should use:
Steps to Reproduce
Steps to reproduce
Actual behavior
The generated document starts with
CREATE PROCEDURE.Expected behavior
The generated document should start with
ALTER PROCEDURE, because the procedure already exists.The same principle should apply to existing functions.
Affected Area
If you selected "Other", please describe the affected area
Go to Definition (F12) for existing stored procedures.
Environment Information
Confirmation