zoukankan      html  css  js  c++  java
  • 数据库操纵语言(DML)

    Insert 插入语句:

    insert into 表名(字段名1,字段名2,字段名3,…)values(”字段值1”,”字段值2”,”字段值3”…)

    例:insert into student(userID,name,sex,…)values(“001”,”张三”,”男”…);

    Insert …select语句:

    insert into 表名(字段名1,字段名2,字段名3,…)select 语句

    例:insert into student(userID,name) select ID,name from user where ID=”002” # 将user表中的用户id和用户名插入到student表中。

    Update语句:

    Update 表名 set列名=”更新值” where 条件

    例:update student set name=”Tom” where name =”Tiny”  # 将student表中Tom的姓名改为Tiny。

    注:修改多个列的值时可以在字段中加英文逗号,

    例:update student set name =”Tom”,sex=”男”;  # 不加where就是表示修改所有的姓名和性别。

    Delete语句:

    Delete from 表名 where 条件

    例:delete from student where name=”Tom”; #从student表中删除名字为Tom的数据。 

  • 相关阅读:
    XV6文件系统
    XV6锁
    PC硬件以及引导加载器
    XV6第一个进程
    XV6操作系统接口
    XV6环境搭建及注意事项
    XV6文件系统
    XV6上下文切换
    少走弯路的十条忠告
    LIBCMTD.lib与libcpmtd冲突的解决方法。
  • 原文地址:https://www.cnblogs.com/yhcTACK/p/14965423.html
Copyright © 2011-2022 走看看