MySQL delete from table

    0

    0

    Python public recipes

    This snippet deletes table from a table.

    Library: mysql-connector-python

    cursor = db.cursor() # db is created from mysql.cursor.connect()
    stmt = """DELETE FROM table WHERE column=%s"""
    cursor.execute(stmt, (value,))
    
    cursor.close()
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.