zoukankan      html  css  js  c++  java
  • MySQL查询语句

    1.固定语法

    select * from 表名
    --*代表查询‘结果’
    1.  若后边有查询条件,则*代表所有可能结果;比如select name/* from 表名 where age ='11';为查询年龄为11的姓名/所有字段
    2.  若后边无条件,则*代表所有查询内容(其实也是查询结果)select * from 表名;
    --  select from 为固定语法,表示从表中查询
    ##select from 中间为查询结果,不可为age = '11'这样的条件
    ##有筛选条件,where不可望,where后边跟筛选条件

    2.扩展

    1.select * from 表名 where name = 'xiaoming' and age = '11';
    --where为固定连词,后跟条件
    --and/or为多条件筛选
    其他变形形式:
    select * from 表名 where age = '11';
    select * from 表名 where name = 'xiaoming';
    select * from 表名 where name = 'xiaoming' and/or age = '11';
    
    ##select name from 表名 where age = '11';
    --查询年龄为11的名字
      
    ##所有代码在英文状态下,保持空格一致
  • 相关阅读:
    DRF JWT认证基础
    Shell简单脚本
    DockerFile案例
    Shell基础知识
    DockerFile基础知识
    tensorflow
    使用cv2将图片分割成相等的部分
    序列化心得
    python正则化表达式
    python--匿名函数(lambda)
  • 原文地址:https://www.cnblogs.com/hudaxian/p/12162029.html
Copyright © 2011-2022 走看看