Home » SQL & PL/SQL » SQL & PL/SQL » How write SQL(select) with a partitioned table
How write SQL(select) with a partitioned table [message #23304] Wed, 27 November 2002 23:47 Go to next message
Jermi
Messages: 2
Registered: November 2002
Junior Member
Hello:
I have created the following test example:
> CREATE TABLE t_test
> (f1 NUMBER,
> f2 number)
> PARTITION BY RANGE(f1)
> (PARTITION t_test1000 VALUES LESS THAN (10000),
> PARTITION t_test2000 VALUES LESS THAN (100000),
> PARTITION t_test3000 VALUES LESS THAN (500000),
> PARTITION t_test_inf VALUES LESS THAN (MAXVALUE))
> /
IN t_test table have 1000000 rows,I think only select data in PARTITION(t_test3000),how write select?
Re: How write SQL(select) with a partitioned table [message #23307 is a reply to message #23304] Thu, 28 November 2002 11:26 Go to previous messageGo to next message
sai sreenivas jeedigunta
Messages: 370
Registered: November 2001
Senior Member
Hi try as below
select * from t_test_table partition (t_test1000);

sai
Re: How write SQL(select) with a partitioned table [message #23311 is a reply to message #23307] Fri, 29 November 2002 11:12 Go to previous messageGo to next message
Su
Messages: 154
Registered: April 2002
Senior Member
I think the ORACLE 9.0 onwards it supports you giving only the partion name in an SQL SELECT, just like

select * from t_test1000);

Check it out.

Good luck :)
Re: How write SQL(select) with a partitioned table [message #23322 is a reply to message #23311] Sun, 01 December 2002 21:08 Go to previous message
Jermi
Messages: 2
Registered: November 2002
Junior Member
I use oracle8.1.6 to run "select * from t_test partition (t_test1000);",it can triumphantly run.

You think the ORACLE 9 supports direct use partition name? But I think this fall short of SQL syntax!Oracle dare to do this thing?
Previous Topic: Re: regarding databaselinks
Next Topic: A problem with infinite loop in trigger.....Pliz solve my problem
Goto Forum:
  


Current Time: Wed May 15 19:05:26 CDT 2024