Rachcha
Rachcha

Reputation: 8816

Adding comments for every row

I have a customer table. I have a new requirement where I have need users to add comments for every new customer that is added to the system or add comments for existing customers.

I know how to add comments on tables and columns so far. I have referred to this for details.

I have considered adding a new column named comments to this table. What else can I do to implement comments for every customer in customer table?

Upvotes: 0

Views: 140

Answers (1)

Paul Grimshaw
Paul Grimshaw

Reputation: 21044

You'll want a separate table for the comments by the sounds of it, so each customer can have multiple comments:

CustomerTable
    CustomerId int
    CustomerName varchar(100)

CommentsTable
    CommentId int
    CommentDateTime datetime
    CustomerId
    Comment varchar(4000)

Upvotes: 1

Related Questions