Create Tables and data or Install example database for Learning SQL Basics.
$sqlplus
Enter user-name: shinoj/shinoj
Connected to:
Oracle Database 10g Release 10.2.0.1.0 - Production
SQL> select * from tab; (List all the Tables)
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
COMPANY TABLE
EMPLOYEE TABLE
EMP_COMPANY TABLE
EMP_SHIFT TABLE
MANAGER TABLE
SALES_DATA TABLE
6 rows selected.
Details of Each Tables.........
SQL> desc company;
Name Null? Type
----------------------------------------- -------- ----------------------------
CNAME VARCHAR2(30)
CITY VARCHAR2(30)
SQL> desc employee;
Name Null? Type
----------------------------------------- -------- ----------------------------
ENAME VARCHAR2(30)
CITY VARCHAR2(30)
SQL> desc emp_company;
Name Null? Type
----------------------------------------- -------- ----------------------------
ENAME VARCHAR2(30)
CNAME VARCHAR2(30)
SALARY NUMBER(7,2)
JDATE DATE
SQL> desc emp_shift;
Name Null? Type
----------------------------------------- -------- ----------------------------
ENAME VARCHAR2(30)
SHIFT CHAR(3)
SQL> desc manager;
Name Null? Type
----------------------------------------- -------- ----------------------------
ENAME VARCHAR2(30)
MNAME VARCHAR2(30)
SQL> desc sales_data;
Name Null? Type
----------------------------------------- -------- ----------------------------
PRODID NOT NULL NUMBER(6)
CUSTID NOT NULL NUMBER
TIMEID NOT NULL DATE
CHANNELID NOT NULL CHAR(1)
PROMOID NOT NULL NUMBER(6)
QUANTITY NOT NULL NUMBER(3)
AMOUNT NOT NULL NUMBER(10,2)
I have just imported two dumps to create the above tables and data
1. company.dmp
2. sales.dmp
Creating tables and inserting data manually will help to improve SQL commands..Hi hi
No comments:
Post a Comment