How to validate sql query syntax?

后端 未结 6 2087
忘掉有多难
忘掉有多难 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:35

    Why would you let them enter whole sql-statements?

    Just provide to fields and let them enter either the statecode or the districtcode.

    Then check if the entered value is a number. And run the appropriate query with the entered value.

提交回复
热议问题