Archive for July, 2011

Remembering log4j levels

A simple sentence to remember log4j levels in the descending order of severity.

On Friday Eve We Invited Doctor Toni.

O – Off

F – Fatal

E – Error

W – Warn

I -Info

D – Debug

T -Trace

Though I have been using log4j for years, most of the time confused with the order, this simple sentence helps me a lot.


Read Full Post »

While writing sql query, I frequently get confused whether to add the keyword ‘table’ to the query or not.

Sometime I write the update query as ‘UPDATE TABLE EMPLOYEE….’, only after the sql exception I will realize that ‘TABLE’ keyword should not be added and now I found the pattern and never repeated such mistakes.

You too can correct that. As you know we have DDL and DML commands. The ‘TABLE’ keyword comes only for DDL commands.

DDL commands:

  • create
  • alter
  • truncate
  • drop
  • comment
  • rename

DML commands:

  • select
  • insert
  • update
  • delete
  • merge

You may follow this link to know the complete list of ddl and dml commands.

Read Full Post »