3

Is it possible to parse T-SQL in exactly the same way as done by the SQL Server?

I suppose there is some code that SQL Server uses to build an AST from the given T-SQL. Is this code available for general audience?

4

1 Answer 1

3

You could use Microsoft.SqlServer.TransactSql.ScriptDom

The Microsoft.SqlServer.TransactSql.ScriptDom namespace provides Microsoft SQL Server-specific Parser and Script Generator support.

Example: A Program to Find INSERT Statements That Don’t Specify Columns

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.