ftsg.net
当前位置:首页 >> mysql怎么查看iD列表中特定几个值 >>

mysql怎么查看iD列表中特定几个值

1、先按这种方式查询 select * from 表名 where id in('276','306','325');

mysql中查询指定ID的数据用where字句。 工具:mysql 5.6 步骤: 1、在mysql有user表,数据如下: 2、要查询ID为2的数据,可用如下语句: select * from user where id=2;3、查询结果: where子句简介: 如需有条件地从表中选取数据,可将 WHERE ...

SELECT SUM(money) FROM name WHERE ID=100 因为100为数字,所以不用加上' '这个引号,直接查询出来的值就是所需要的值。

SELECT m.aid,m.b1id,n.bcon,m.b2id as b2id,o.bcon as b2con, m.b3id as b3id,p.bcon as b3con FROM `test` as m INNER JOIN test1 as n on m.b1id=n.bid INNER JOIN test1 as o on m.b2id=o.bid INNER JOIN test1 as p on m.b3id=p.bid; 结果:

CREATE TABLE A (id int);CREATE TABLE B (id int);INSERT INTO A VALUES(1);INSERT INTO A VALUES(2);INSERT INTO A VALUES(3);INSERT INTO B VALUES(1);INSERT INTO B VALUES(2);INSERT INTO B VALUES(3);INSERT INTO B VALUES(4);INSERT INTO...

select A.AID,A.Name,B.Name from A,B where A.BID = B.BID 或者 select A.AID,A.Name, ( select B.Name from B where B.BID = A.BID ) from A

select url from B where id in (select id from A where lgid = 2 and id like 'F%' and director is null) 语句是这样的,你不懂哪里就说吧

是这样吗 select * from A where id=(select uid from A where id=3)

mysql中查出除了某个字段外的所有字段的值方法: 1、如果是查出某个字段以外的字段名 语句为select name from syscolumns where id=object_id('表1') and name'ID' 2、如果是查出某个字段以外的字段名所包含的值 语句为declare @a varchar(max) ...

可以建一个表B,字段为id,写入这100个id值 Select idFrom 表BWhere id in ( Select id from 表A)

网站首页 | 网站地图
All rights reserved Powered by www.ftsg.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com