zoukankan      html  css  js  c++  java
  • mysql单表删除记录DELETE

    DELETE FROM tbl_name  [WHERE where_condition]

    mysql> SELECT * FROM users;
    +----+----------+----------+-----+------+
    | id | username | password | age | sex |
    +----+----------+----------+-----+------+
    | 1 | Tom | 123 | 29 | 0 |
    | 2 | John | 456 | 38 | 0 |
    | 3 | Tom | 123 | 27 | 0 |
    | 4 | John | 456 | 27 | 0 |
    | 5 | John | 456 | 10 | 0 |
    | 10 | John | 456 | 21 | 0 |
    | 11 | ROSE | 67 | 4 | 0 |
    | 12 | Ben | 456 | 13 | 0 |
    +----+----------+----------+-----+------+

    mysql> DELETE FROM users WHERE id = 5;
    Query OK, 1 row affected (0.04 sec)

    mysql> SELECT * FROM users;
    +----+----------+----------+-----+------+
    | id | username | password | age | sex |
    +----+----------+----------+-----+------+
    | 1 | Tom | 123 | 29 | 0 |
    | 2 | John | 456 | 38 | 0 |
    | 3 | Tom | 123 | 27 | 0 |
    | 4 | John | 456 | 27 | 0 |
    | 10 | John | 456 | 21 | 0 |
    | 11 | ROSE | 67 | 4 | 0 |
    | 12 | Ben | 456 | 13 | 0 |
    +----+----------+----------+-----+------+

  • 相关阅读:
    android 源码
    android 保护
    电池信息 显示
    RGB、HSB、HSL 互相转换算法
    网页美工
    css 设计标准
    js 封闭 小结
    格式转换工具
    网页设计规范
    瀑布流分析
  • 原文地址:https://www.cnblogs.com/toudoubao/p/6618201.html
Copyright © 2011-2022 走看看