I will start this article with a real-life story: As a database consultant, I do a lot of different works. I write technical articles, do some other database tasks like SQL development and database administration. So, I have a lot of SQL clients, and tools installed on my computer. One sunny day I begin to work in the morning. While I am enjoying my coffee I opened my SQL client, and I run a simple script to create and populate a table for an article. Before I create a table, I try a “drop table” using the “if exists” clause. Just to be sure the “create table” works. The table name was an employee, a pretty common table name. I connected my SQL client default with a production database. I didn’t realize my fault. And of course, my client production database had a table called employee!
Immediately I pressed the green arrow to execute the SQL. I realized that something was wrong. I tried to revert but it was too late. The table “employee” of the production database of an important customer was completely deleted!
Why I’m telling you this history? Because, if my SQL client should have QuerySense, the table wasn’t be dropped.
The QuerySense feature makes TeamSQL unique. It can detect any potential data loss while executing SQL statements like truncate, drop, or delete and display a box to ask you for a confirmation, as you can see in the following print screen:
When QuerySense Works?
The QuerySense feature is activated by default on any production connection. Again we are talking about another big concept of TeamSQL: “production connections”, that is not minor, and believe it or not, is a concept not present in many modern SQL clients. Anyway if you want to activate the QuerySense feature on all the connections, you can do it by going to File menu, and then select the Preferences option. You can see the following window:
In the preferences window, you can activate QuerySense for all connections(production and non-production), or if you wish you can turn off QuerySense.
TeamSQL is a SQL client plenty of exciting features, some of them (like snippets, cloud queries, themes, or even the subject of this article: QuerySense) make TeamSQL a unique and modern piece of software. With the delivery of every new version of TeamSQL, we are powering a fast-growing community of users. Experiment TeamSQL and be a proud member of the TeamSQL community.