【发布时间】:2013-05-26 10:57:09
【问题描述】:
我有以下数据库结构
1 表名为 Books (BookId,Title) 1 表名为 Authors (AuthorId,AuthorName) 1 个名为 BooksAuthors (BookID,AuthorID) 的连接表,与其他 2 个表有关系
我正在使用这个查询:
Select
Books.BookId,
Books.Title,
Authors.AuthorName
From
(Books Inner Join
BooksAuthors On BooksAuthors.BookId = Books.BooksId) Inner Join
Authors On BooksAuthors.AuthorId = Authors.AuthorId
我得到这样的东西:
BookId Title AuthorName
001 Title1 Name1
001 Title1 Name2
001 Title1 Name3
002 Title2 Name5
002 Title2 Name6
我想知道是否可以执行返回如下内容的查询:
BookId Title AuthorName
001 Title1 Name1;Name2;Name3
002 Title2 Name5;Name6
【问题讨论】:
-
你用的是什么数据库?
-
数据库在ms访问中
标签: sql vb.net ms-access-2007