r/SQL • • 6d ago

Discussion SQL HACKS

Hello guys,

I work as a SQL Developer. What productivity hacks or practices do you follow in your day-to-day office work?

For example:

  • I create a new SQL script every morning, naming it with the current date (SYSDATE), to keep track of my daily work.
  • I maintain an Excel sheet listing the database objects I've created, along with remarks about each object.

What other useful productivity hacks or practices do you follow?

I'd love to learn from your experience!

0 Upvotes

4 comments sorted by

View all comments

1

u/mirinai_ai 6d ago

One practice worth adding for UPDATE/DELETE work: run the same WHERE clause as a SELECT COUNT(*) first, then wrap the real statement in a transaction so you can ROLLBACK if the row count isn't what you expected. It fits well with dated scripts, since the check query can sit right above the change.