SQL Interview #24: DROP and CREATE vs ALTER for T-SQL Functions
This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.
Section: Development Level: Medium
Question:
You are writing a script to change the code in a T-SQL function.
You can choose to either DROP IF EXISTS and CREATE the procedure, or to use an ALTER statement.
What advantage would you get from using an ALTER statement?
2025-03-07