数据库三表连接查询的sql语句

版权声明:博客知识产权来源命运的信徒,切勿侵权 https://blog.csdn.net/qq_37591637/article/details/89873530

总共有三个表

1、stitle是测试的题目

2、card是一个题目下面的许多标题

3、option是一个标题下面的选项

 


sql语句如下

select * from (stitle s LEFT JOIN card c ON c.tid=s.tid)  LEFT JOIN `option` o ON o.mid=c.mid   where title='测试你成功的方向'

查询结果如下

猜你喜欢

转载自blog.csdn.net/qq_37591637/article/details/89873530