Pooja
Pooja

Reputation: 33

insert multipla values in a single column

I created following table in SQL Server 2000

create table book(id integer, author varchar(20))

In this, each book may have 1 or more authors.

My question is that, how can insert more value to author column like as follows.

id   author
1    pooja merry james
2    robert stephen

Upvotes: 1

Views: 187

Answers (1)

Joe Stefanelli
Joe Stefanelli

Reputation: 135848

You have a many-to-many relationship between books and authors, so you need to create an independent table of authors and then introduce a junction table to map books to authors.

enter image description here

Upvotes: 4

Related Questions