Tuesday, 24 April 2012

SELECT statement, Small SQL Queries || Where Clause || Logical Conditions || Null Conditions || Exists and Like Conditions


SQL Queries, SELECT Statement

Use a SELECT statement or subquery to retrieve data from one or more tables, object tables, views, object views, or materialized views.
For example to retrieve all rows from emp table.


  SQL> select  empno, ename, sal  from emp;

  •  if you want to see all the columns values You can also give * which means all columns.
 SQL> select * from emp;

Thursday, 19 April 2012

Creating Tables in Oracle

Designing Tables

Consider the following guidelines when designing your tables:

  • Use descriptive names for tables, columns, indexes, and clusters.
  • Be consistent in abbreviations and in the use of singular and plural forms of table names and columns.
  • Document the meaning of each table and its columns with the COMMENT command.
  • Normalize each table.
  • Select the appropriate datatype for each column.
  • Define columns that allow nulls last, to conserve storage space.
  • Cluster tables whenever appropriate, to conserve storage space and optimize performance of SQL statements.

Wednesday, 18 April 2012

Oracle Built-in Datatypes

Datatypes

       Each value manipulated by Oracle Database has a datatype. The datatype of a value associates a fixed set of properties with the value. These properties cause Oracle to treat values of one datatype differently from values of another. For example, you can add values of NUMBER datatype, but not values of RAW datatype.

Oracle provides following categories of built-in datatypes:

  • Character Datatypes
                * CHAR
                * NCHAR
                * VARCHAR2 and VARCHAR
                * NVARCHAR2
                * CLOB
                * NLOB
                * LONG 

Saturday, 14 April 2012

Dr. E.F. Codd's 12 Rules


Database

       Database is a collection of data(information) that is organized so that it can easily be accessed, managed, and updated.

Database Management System(DBMS)

       A database management system is a collection of programs written to manage a database. That is, it acts as a interface between user and database.


                                        

Thursday, 12 April 2012

First Post

Hi,

   This is Raja...

        It is my first Post...

               Have a nice Day...

                      Thanks to All...