zoukankan      html  css  js  c++  java
  • SQL语法

    select 列名称 from 表名称
    select * from 表名称

    insert into 表名称 values ('1','2','3',...) 插入新的行
    insert into 表名称 (列1,列2,...) values ('1','2','3',...) 指定所要插入数据的列

    insert into 表名称 select * from 表名称 //从其他表添加数据

    alter table 表名称 add 列名称 datatype //增加列


    update 表名称 set 列名称 = '新值' where 列名称 = '某值'
    修改数据


    delete from 表名称 where 列名称 = '值' //删除行

    delete from 表名称 //删除所有行

    alter table 表名称 drop column 列名称 //删除列 删除列之前该列所有的索引和约束必须首先删除

    truncate table 表名称 //删除整个表
    drop table 表名称 //删除表

    drop datebase 数据库名称 //删除数据库

    select 列名称 from 表名称 where 列 运算符 '值'
    条件选择

    select * from Persons where FirstName = 'Thoms' and LastName = 'Carter'

    and or


    select ID from Students order by student asc

    order by 排序(默认升序)
    asc 升序
    desc 降序排序

  • 相关阅读:
    rs
    stm32f767 usoc3
    stm32f767 RTT 日志
    stm32f767 标准库 工程模板
    stm32f767 HAL 工程模板
    docker tab 补全 linux tab 补全
    docker anconda 依赖 下载 不了
    docker run 常用 指令
    linux scp 命令
    Dockerfile 常用参数说明
  • 原文地址:https://www.cnblogs.com/xslwm/p/9802867.html
Copyright © 2011-2022 走看看