Skip to content

Extend tsql ALTER TABLE WITH DROP CONSTRAINT IF EXISTS option #6956

@IngerMathilde

Description

@IngerMathilde

Search before asking

  • I searched the issues and found no similar issues.

Description

For the tsql dialect the following statement gives a parsing error:

ALTER TABLE #Persons DROP CONSTRAINT IF EXISTS PK_Person;

This is however valid sql code as mentioned in https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/sql-ref-syntax-ddl-alter-table-drop-constraint

Use case

ALTER TABLE #Persons DROP CONSTRAINT IF EXISTS PK_Person;

should not give a parsing error

Dialect

Tsql

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestt-sqlIssues related to the T-SQL/TSQL/Transact SQL dialect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions