inner join的用法以这句话为例子SELECT au_lname,au_fname,title,pub_name FROM authors a INNER JOIN titleauthor ta SELECT au_lname,au_fname,title,pub_name FROM authors a INNER JOIN titleauthor ta ON a.au_id = ta.au_id INNER JOIN titles t ON t.t
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 16:37:36
inner join的用法以这句话为例子SELECT au_lname,au_fname,title,pub_name FROM authors a INNER JOIN titleauthor ta SELECT au_lname,au_fname,title,pub_name FROM authors a INNER JOIN titleauthor ta ON a.au_id = ta.au_id INNER JOIN titles t ON t.t
inner join的用法
以这句话为例子SELECT au_lname,au_fname,title,pub_name
FROM authors a INNER JOIN titleauthor ta
SELECT au_lname,au_fname,title,pub_name
FROM authors a INNER JOIN titleauthor ta
ON a.au_id = ta.au_id INNER JOIN titles t
ON t.title_id = ta.title_id INNER JOIN publishers p
ON t.pub_id = p.pub_id
原文是这样
inner join的用法以这句话为例子SELECT au_lname,au_fname,title,pub_name FROM authors a INNER JOIN titleauthor ta SELECT au_lname,au_fname,title,pub_name FROM authors a INNER JOIN titleauthor ta ON a.au_id = ta.au_id INNER JOIN titles t ON t.t
inner join = join 内连接.表中至少有1个匹配时,才返回行.
举个例子吧.
表A
id name
1 张
2 李
3 王
表B
id address A_id
1 北京 1
2 上海 3
SQL语句如下:
select A.name,B.address from
A inner join B
on A.id = B.A_id
查询结果为:
张 北京
王 上海