How to validate sql query syntax?

后端 未结 6 2131
忘掉有多难
忘掉有多难 2020-12-09 22:51

java 1.4 Sql server 2000

i am taking input of sql query (for validation of field value against values retrieved by executing sql query) from admin user which will be

6条回答
  •  难免孤独
    2020-12-09 23:48

    You could do SET FMTONLY ON and then execute the query and see if it works. Just remember to do SET FMTONLY OFF in a finally block, since it's a connection-level setting.

提交回复
热议问题