SQLTeam.com | Weblogs | Forums

Table Partitions


Hi every one.

I am about to create a new table and there will be a column named STAMP which contains datetime. Now I like to create table partition on datetime column. One partition should contains 1 day data and i need 7 partition so that I can manage one week data. I am new to table partition so I have following concerns.

  1. How to create partition on datetime column
    2 after one week data insertion there should be 7 partitions, on 08 day it should drop one day partition. that's how it should maintain 07 days data.
    3 How I can do it programmatic, that every day it creates a new partition and drop first partition.