October 22, 2012

"TABLE" keyword and SQL statements

We are many a times confused about whether TABLE keyword appears in a SQL statement. Here I present a handy trick. It says:

Read below sentences in sequence-
Beside others, there are two types of SQL statements- DDL and DML.
DDL deals with creating, altering and dropping data structures such as tables.
DML deals with inseting, updating and deleting data within tables.

As DDL deals with main furniture of database, i.e., tables (similar to wooden tables) and they can drop your tables (on the ground to destroy them), they expect use of TABLE word explicitly.

As DML deals with data within tables, they do not use the word TABLE. In DML statements, table name appears directly (without use of keyword TABLE).
INSERT INTO table01 ...; -- TABLE keyword not used here
UPDATE table01 ...; -- TABLE keyword not used here
DELETE FROM table01 ...; -- TABLE keyword not used here

The above find is my own. In the beginning, even I had also been confused with the use of TABLE keyword. But, as it is rightly said, "Need is the mother of Discovery," I have finally come out of this trauma.

[If you like posts, do share their links.]

October 17, 2012

Oracle database default setup Users and their Passwords

When you install Oracle database engine using default installation configuration, few superusers are created.

Two such users are:
  • SYS
Users SYS and SYSTEM are:
– created automatically during database creation,
– granted the DBA role.

• User SYS
– Owner of the database data dictionary
– Default password: change_on_install

– Owner of additional internal tables and views used by Oracle tools
– Default password: manager

Hope you won't again be depressed if you forget to check or change default passwords of these users while setting Oracle database engine up!

Did you know:
You can easily find i-tech-freak.blogspot.com listed on first page of Google search results by querying for "i-tech-freak". Enjoy reading.