Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SQLapprentice
Starting Member
29 Posts |
Posted - 2012-01-18 : 20:52:54
|
| Hi all!I'm building a simple database which has several books, and each book has several versions.I created a database which has a table 'book' that in turn has one column 'bookName' that is a primary key. I also created a table 'version' which has 2 columns: versionName(Primary key) and bookName(foreign key that refers to books).I would like to ask you can I query the database how many versions has each book. I know I have to use count but how can I find out which tables are referenced by book? Thanks in advance! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
SQLapprentice
Starting Member
29 Posts |
Posted - 2012-01-18 : 21:24:11
|
| Thank you! it's not homework! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|