Re: Table partitioning in ORACLE...

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 19 Dec 2005 09:00:11 -0800
Message-ID: <1135011597.663755_at_jetspin.drizzle.com>


cutie wrote:

> i cant understand...first of all how can i check if the partition is
> EMPTY OR NOT????secondly....if its empty then is it write to just write

You've certainly got me in your second question "then is it write to just write" but with respect to the first one try this demo.

CREATE TABLE pt (
deptno NUMBER(10),
state VARCHAR2(2))
PARTITION BY LIST (state) (

PARTITION q1_northwest VALUES ('OR', 'WA'),
PARTITION q1_southwest VALUES ('AZ', 'CA', 'NM'),
PARTITION q1_northeast VALUES ('NY', 'VT', 'NJ'),
PARTITION q1_southeast VALUES ('FL', 'GA'),
PARTITION q1_northcent VALUES ('MN', 'WI'),
PARTITION q1_southcent VALUES ('OK', 'TX'));

INSERT INTO pt VALUES (1, 'WA');

INSERT INTO pt VALUES (1, 'OR');
INSERT INTO pt VALUES (1, 'CA');

SELECT COUNT(*) FROM pt;

SELECT COUNT(*) FROM pt PARTITION (q1_northwest);

HTH

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Mon Dec 19 2005 - 18:00:11 CET

Original text of this message