title: SQL Server: should I use an "Agent Job" or a "Maintenance Plan" to delete old data?
body: <p>I'm looking for a way to periodically (e.g. weekly) run some SQL statements in a database to delete old data. As far as I can see, there are (at least) two ways to do this:</p>
  
  <ul>
  <li>using a "Maintenance Plan" and a "Execute T-SQL Statement Task"</li>
  <li>using an "SQL Server Agent Job" and specify the statements in a "Step" of that job</li>
  </ul>
  
  <p>My question is: what is the difference between these two possibilities and which one should I use for my task?</p>