Question: How To Delete All Sma_Payments Before Such Date

How To Delete All Sma_Payments Before Such Date

Hi, How to delete all sma_payments of the last year 2020 exactly before 01/02/2021. I need an sql code to run it in database . regards.

MB

Mehdi boudhir

Asked
Hi, How to delete all sma_payments of the last year 2020 exactly before 01/02/2021. I need an sql code to run it in database . regards.
  • MS

    Mian Saleem

    Answered
    Hello,

    Same as you deleted the sales.

    ```sql
    DELETE sma_payments FROM sma_payments WHERE date < '2020-12-31 23:59:59';
    ```

    You can change the if you need.

    Thank you
  • Login to Reply