Feeds:
Posts
Comments

Archive for the ‘sql’ Category

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.

Advertisements

Read Full Post »