Home > Database > Mysql Tutorial > select-mysql 外键用逗号隔开的怎么让它相等

select-mysql 外键用逗号隔开的怎么让它相等

WBOY
Release: 2016-06-06 09:34:47
Original
960 people have browsed it

selectmysqlsql

如:表1

id name code
1 名字 a
2 名字 b
3 名字 c
表2
id 表1外键 val val
1 1 .. ...
2 2 .. ...
sql select * from 表1 inner join 表2 on 表1.id=表2.表1外键

我现在的问题是:
表1

id name code
1 名字 a
2 名字 b
3 名字 c
表2
id 表1外键 val val
1 ‘1 ,2’ .. ...
2 '2 ,3' .. ...
sql select * from 表1 inner join 表2 on 表1.id=表2.表1外键

表2.表1外键 用逗号隔开的 这种要怎么写?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template