title: write a sql stored procedure to delete the data from the table?
body: <p>I have a simple application which stores the data into the sql server database table named student table .The design of the table is as follows 3 colums. name ,sex and registeredtime(datetime).In my WPF window i have three fields to insert the data into the table.Now i want to have the delete button based on the input given by the user(which is a datetimepicker).</p>
  
  <p>How to delete the data from the table which is 7 days old compared to the date given by the user. ?</p>
  
  <p>I want to have a stored procedure which i can call from the c# code.i am able to try some thing like this but <code>Select * from studenttable where registereddate &lt; GetDate()-7</code> but i am unable to achieve what i am supposed to ...</p>