数据库两个表关联查询

user  表字段  id =1    name = liuwenwen

customer   表字段  id =1     num = 88

通过user表中的id查customer表的num,   select  * from customer  where  num in (select  * from  user  where id = 1);

或者   select  * from user  a  , cutomer  b  where   a.id=1  and a.id = b.num


版权声明:本文为liulu951240778原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。