Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

partitioning the tables using the same partition function

$
0
0

hello,

i am tryinng to partition about 20 tables in the same database using one single partition function and one single partition scheme 

ex:

CREATE PARTITION FUNCTION partfunc (int) AS RANGE Left For Values(N'20140201', N'20140202'......)

CREATE PARTITION SCHEME PartScheme AS PARTITION PartFunc to(primay, primary,.....)

CREATETABLE[dbo].[Tab1](

       

productkey int null,

salesamount int null,

monthkey int not null

)ON[PartScheme]([MonthKey])

CREATETABLE[dbo].[Tab2](

       

product varchar null,

salesamount int null,

monthkey int not null

)ON[PartScheme]([MonthKey])

CREATETABLE[dbo].[Tab3](

       

city varchar null,

salesamount int null,

monthkey int not null

)ON[PartScheme]([MonthKey])

..................................................................

please let me know how can i do this???

      


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>