Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
serpent
Starting Member
2 Posts |
Posted - 2009-02-12 : 02:01:34
|
| There are only two types of queries that we can run on Database. One that can change the state of the Database (like insert,update,delete,create). Second that can't change the state like select queries. My question is that, is there any way to detect the type of query (whether it will change the state or not) before executing the query on database?Parsing the query string with regular expersion is one way. But is there any other better way to do this thing? If parsing is the only option tell me what is the most optimize way to detect query type. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-12 : 02:11:17
|
You have DDL statement (ALTER, DROP, CREATE and so on) and you have DML statements (SELECT, DELETE, UPDATE and INSERT). E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|
|