Skip to content

MSSQL: Support THROW statement#2202

Open
guan404ming wants to merge 1 commit intoapache:mainfrom
guan404ming:feat/mssql-throw-statement
Open

MSSQL: Support THROW statement#2202
guan404ming wants to merge 1 commit intoapache:mainfrom
guan404ming:feat/mssql-throw-statement

Conversation

@guan404ming
Copy link
Member

Why

The MSSQL THROW statement was missing from the sqlparser, preventing parsing of T-SQL error handling code.

How

  • Add THROW keyword and Statement::Throw AST variant with optional error_number, message, state
  • Add parse_throw() handling both THROW (re-throw) and THROW num, msg, state forms
  • Add tests for literal args, variable args, and argument-less re-throw

Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
@guan404ming
Copy link
Member Author

Hi @iffyio I would like modify the PR title to MSSQL: support THROW statement to better align the convention here but I found there is no edit button here for this pr. Could you help modify it, thanks!

@iffyio iffyio changed the title Add MSSQL THROW statement support MSSQL: Support THROW statement Feb 7, 2026
@iffyio
Copy link
Contributor

iffyio commented Feb 7, 2026

Done!

@guan404ming
Copy link
Member Author

Thanks! Please let me know if there is anything could be better in this pr, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants