zoukankan      html  css  js  c++  java
  • mysql 高级查询二

    各种show
    show columns from my_student;
    show grants for root;
    show aviables;
    show processlist;
    show table status
    ============================
    alter table my_class add id varchar(10);
    alter table my_class change id id varchar(10) first;
    alter table my_class change class room varchar(10);
    truncate my_class;
    insert into my_class values('1','Java01','A101'),('2','Python01','B101');
    insert into my_class (id,name,room) value ('3','Java02','B203');
    update my_student set c_id='3' where name in ('Tom','Lily','张三');
    update my_student set c_id='1' where name in ('Lucy','Anthony');
    update my_student set c_id='2' where name ='李四';
    select * from my_student inner join my_class on my_student.c_id=my_class.id;
    select * from my_student inner join my_class on c_id = my_class.id;
    select s.*,c.name as c_name,c.room from my_student as s inner join my_class as c on s.c_id=c.id;
    select s.*,c.name as c_name,c.room from my_student as s inner join my_class as c where s.c_id=c.id;

  • 相关阅读:
    Ubuntu 图形界面和终端切换
    docker 启动失败
    Windows 压缩文件到 Linux中解压文件名乱码
    PHP注释标记整理
    docker常用命令
    caffe初体验
    css中的单位
    js动态添加div
    Pycharm 2019 添加 docker 解释器
    常用的方法整理
  • 原文地址:https://www.cnblogs.com/51testing/p/8296091.html
Copyright © 2011-2022 走看看