elasticsearch定义了两种查询方式: 一.索引(index).type.document 相关语句 1.列出所有索引的状态 GET /_cat/indices?v health status index uuid pri rep docs.count docs.deleted store.size pri.store.size yellow open my_index SOgui_yKSXacTlMHQQht9w 5 1 5 0 14.3kb 14.3kb yellow open ba…
1.查询数值型数据: SELECT * FROM tb_name WHERE sum > 100; 查询谓词:>,=,<,<>,!=,!>,!<,=>,=< 2.查询字符串 SELECT * FROM tb_stu WHERE sname = ‘Cricode.com’ SELECT * FROM tb_stu WHERE sname like ‘Uncle%Too’ SELECT * FROM tb_stu WHERE sname like ‘%程序…
一.查询数值型数据: SELECT * FROM tb_name WHERE sum > 100; 查询谓词:>,=,<,<>,!=,!>,!<,=>,=< 二.查询字符串 SELECT * FROM tb_stu WHERE sname = '小刘' SELECT * FROM tb_stu WHERE sname like '刘%' SELECT * FROM tb_stu WHERE sname like '%程序员' SELECT * FROM…
一查询数值型数据: SELECT * FROM tb_name WHERE sum > 100; 查询谓词:>,=,<,<>,!=,!>,!<,=>,=< 二查询字符串 SELECT * FROM tb_stu WHERE sname = '小刘' SELECT * FROM tb_stu WHERE sname like '刘%' SELECT * FROM tb_stu WHERE sname like '%程序员' SELECT * F…
一查询数值型数据: SELECT * FROM tb_name WHERE sum > 100; 查询谓词:>,=,<,<>,!=,!>,!<,=>,=< 二查询字符串 SELECT * FROM tb_stu WHERE sname = '小刘' SELECT * FROM tb_stu WHERE sname like '刘%' SELECT * FROM tb_stu WHERE sname like '%程序员' SELECT * FROM t…
最近在加强sql 语句的学习,整理一下基本语法,现在记录下 select * from dbo.cangku where city='河南' select distinct(city), cangkuId from dbo.cangku //取消重复的列值 select SUM (gongzi) as zgz from dbo.zhigong //总工资 select cangkuId ,city from dbo.cangku where not city='河南'…
1.单表查询:select * from 表名 where id = 111 2.查询表内数据并以id排序:select * from 表名 order by id (降序:desc/升序:asc) 3.多表连接查询:select 表a.id,name...,表b.age,birthday... from 数据库A 表a,数据库A 表b where a.id = b.id 4.增:insert into 表名(‘aid’,‘aname’,‘aage’,‘abirthday’...) 5.删:de…
工作中会遇到一些比较有用的mysql查询语句,有了它,可以对mysql进行更全面的维护和管理,下面就写一下我记录的 1.按照字段ru_id查询dsc_order_goods表中ru_id出现次数由多到少排序 SELECT ru_id,count(*) AS count FROM `dsc_order_goods` GROUP BY ru_id ORDER BY count DESC; 2.允许远程用户登陆mysql grant all PRIVILEGES on *.* to root@'192…
1. 查询单表全部 select* from 数据表名; 2. 查询单表中一个或者多个字段 select 字段1,字段2 from 数据表名; 3. 查询单表中的指定信息 select* from 数据表名 where 属性= .....: 查询所有红色的产品号 SELECT ProductNumber from SalesLT.Product WHERE Color = 'Red' 4. 带有 IN 关键字的查询 Select* from 数据表 where 字段 [NOT] IN (字段值…
让你快速复习语句的笔记宝典. create table users( username varchar(20) primary key, userpwd varchar(20) ) alter table users add age int insert into stu (sname)values('sdfdsfdsfeeeeee') update cj set cj=60 where sid=1 delete from cj where sid=2 --所有行所有列 select…
关于MySQL常用的查询语句 一查询数值型数据: ; 查询谓词:>,=,<,<>,!=,!>,!<,=>,=< 二查询字符串 SELECT * FROM tb_stu WHERE sname = '小刘' SELECT * FROM tb_stu WHERE sname like '刘%' SELECT * FROM tb_stu WHERE sname like '%程序员' SELECT * FROM tb_stu WHERE sname like '%…