tags:

views:

52

answers:

1

This question is based on this thread.

CREATE TABLE Answers 
     (
         QUESTION_ID integer FOREIGN KEY REFERENCES Questions(USER_ID) 
                             PRIMARY KEY 
                             CHECK (USER_ID>0), 
         ANSWER nvarchar(4000) NOT NULL
                             AUTO_INCREMENT                                                      
     );

I am not sure about the purpose of AUTO_INCREMENT in the column ANSWER. What does it increase when the value of the content in the column ANSWER is varchar?

+3  A: 

I'd say it's a typo; it doesn't make any sense to me to use auto increment on anything other than something that's an int (long, short, byte, etc.).

lumpynose
Thank you for your answer!
Masi