1. A computerized method for analyzing SQL queries for constraint violations comprising: tokenizing a SQL query to generate a token stream; generating lexical nodes by iterating over the token stream to chunk into SQL commands, SQL functions and field/table identifiers; constructing a parse tree by iterating over the lexical nodes; analyzing, using a processor, the parse tree for constraint violations by comparing the parse tree to a SQL schema and access configuration for a database, wherein the analyzing includes identifying invalid fields and table access, wherein identifying invalid fields and table access comprises identifying parse tree identifiers for fields or tables that do not exist or for which access is restricted; and performing risk mitigation for SQL queries that are likely harboring an SQL injection attack.