Creating clustered indexes on partitioned tables  Altering data partitions

Chapter 10: Partitioning Tables and Indexes

Creating a partitioned table from an existing table

To create a partitioned table from an existing table, use the select into command. You can use select with the into_clause to create range-, hash-, list-, or round-robin–partitioned tables. The table from which you select can be partitioned or unpartitioned. See the Reference Manual for complete syntax and usage information for select.

NoteYou can create temporary partitioned tables in tempdb using select with the into_clause in your applications.

For example, to create the partitioned sales_report table from the salesdetail table, enter:

select * into sales_report partition by range (qty)
(smallorder values <= (500) on seg1,
bigorder values <= (5000) on seg2)
from salesdetail




Copyright © 2005. Sybase Inc. All rights reserved. Altering data partitions

View this book as PDF