Skip to main content

cluster tables




Creating a Cluster: Example 


CREATE CLUSTER emp_dept
   (deptno NUMBER(2));

Cluster Keys: Example 

CREATE INDEX idx_emp_dept ON CLUSTER emp_dept;

Adding Tables to a Cluster: Example 

CREATE TABLE dept_cluster
   CLUSTER  emp_dept  (deptno)
   AS SELECT * FROM dept ;

Adding Tables to a Cluster: Example 

CREATE TABLE emp_cluster
   CLUSTER  emp_dept  (deptno)
   AS SELECT * FROM emp;

Query the cluster tables;

select * from emp_cluster;
select * from dept_cluster;

Comments

Divyanshu said…
Well explained.
Thank you.
Sahaja said…
Very useful for beginners
Unknown said…
Very helpful content.
thank you for the clear and concise explanation! helped a lot.
Well explained.
Easy to understand for beginners.
Shantha said…
Easy to understand and step by step explanation was very helpful.
Malavieka said…
Easy explanation for beginners .
Thank you.
very useful and easy to understand
Rinitha Jose said…
Easy to understand the concept with the help of the examples provided.
sindhuja said…
Every step is explained clearly
bhavya said…
Well explained sir
thank you
bhavana said…
step by step process with good explanation and easy to understand
Manasa said…
easy to understand and very helpful
sayani said…
The topic is explained clearly step by step. thank you, sir.
Anonymous said…
Gud Explanation.thank you sir
Tanya said…
Nicely explained. Thank you sir!
MK said…
Very easy to understand. Helped me a lot.
alpanshi said…
well explained......
Meghana said…
Easy understandable concept well explained.
Well explained! Thankyou sir.
Sneha said…
Explain concepts easily and precisely..
Joy said…
Every step is explained clearly. Thank you.
This concept looks very simple and easy after I went through this blog,
thanks for making them easy to understand.
Ankit Gupta said…
To the point!! Very nicely explained.
Thank You sir.
Arunangshu Sen said…
Good explanations making difficult concepts easy to understand.
Pranav said…
good explanation
Sadananda said…
Nicely explained and super easy to follow
Unknown said…
explained in a simple way and it was easy to understand.
This concept looks very simple and easy after I went through this blog.
Sourav Nandy said…
This comment has been removed by the author.
Sourav Nandy said…
Time saving exercise thanks for this.
Unknown said…
Easy to understand..Good example
Unknown said…
Easily explained ..... Good example by the way.. Thank you

Popular posts from this blog

PL / SQL practice programs

  PL / SQL  practice programs 1. Write a program to print the following format WELCOME TO PL/SQL PROGRAMMING   BEGIN   DBMS_OUTPUT.PUT_LINE('WELCOME   TO   PL/SQL   PROGRAMMING'); END; /   2. Write a program to print the numbers from 1 to 100   DECLARE N NUMBER(3):=1; V VARCHAR2(1000); BEGIN WHILE N <=1000 LOOP V:=V||''||N; N:=N+1; END LOOP; DBMS_OUTPUT.PUT_LINE(V); END; / 3. write a program to print the even numbers from 1 to 100 DECLARE N NUMBER(3):=0; BEGIN WHILE N <=100 LOOP N:=N+2; DBMS_OUTPUT.PUT_LINE(N); END LOOP; END; / 4. Write a program to print the odd numbers from 1 to 100 DECLARE N NUMBER(3):=1; BEGIN WHILE N <=100 LOOP N:=N+2; DBMS_OUTPUT.PUT_LINE(N); END LOOP; END; / 5. write a program for multiplication table DECLARE A NUMBER(2):=&A; B   NUMBER(2):=1; C   NUMBER(3); BEGIN WHILE B <

RDBMS MINI PROJECT

  Capgemini class room training.   RDBMS MINI PROJECT ( SPRINT ) LIBRARY MANAGEMENT SYSTEM   Table of Contents Serial No. Topic Name Content Page No. 1.   Introduction 1.1 Setup checklist for mini project 3     1.2 Instructions 3 2.   Problem statement   2.1 Objective 4     2.2 Abstract of the project 4     2.3 Functional components of the project 4     2.4 Technology used 5 3.   Implementation in RDBMS LOT 3.1 Guidelines on the functionality to be built 6 4.   Evaluation 4.1 Evaluation 7     1.      Introduction This document outlines a mini project for the RDBMS LOT

sample tables

  --sample tables DROP TABLE EMP; DROP TABLE DEPT; DROP TABLE BONUS; DROP TABLE SALGRADE; DROP TABLE DUMMY;   CREATE TABLE EMP        (EMPNO NUMBER(4) NOT NULL,         ENAME VARCHAR2(10),         JOB VARCHAR2(9),         MGR NUMBER(4),         HIREDATE DATE,         SAL NUMBER(7, 2),         COMM NUMBER(7, 2),         DEPTNO NUMBER(2));   INSERT INTO EMP VALUES         (7369, 'SMITH',   'CLERK',      7902,         TO_DATE('17-DEC-1980', 'DD-MON-YYYY'),   800, NULL, 20); INSERT INTO EMP VALUES         (7499, 'ALLEN',   'SALESMAN',   7698,         TO_DATE('20-FEB-1981', 'DD-MON-YYYY'), 1600,   300, 30); INSERT INTO EMP VALUES         (7521, 'WARD',    'SALESMAN',   7698,         TO_DATE('22-FEB-1981', 'DD-MON-YYYY'), 1250,   500, 30); INSERT INTO EMP VALUES         (7566, 'JONES',   'MANAGER',    7839,         TO_DATE('2-APR-1981', 'DD-MON-YYYY'),   2975, NULL,