0

How to insert IDENTITY column when creating table by this method (creating IDENTITY in table level)?

Create Table ProspectiveTenant
(
PTID int,
Name varchar (25),
Email varchar (25),
ApplicationFillDateTime Date,
MetSamanthaDateTime Date
Add (PTID) Identity (1,1)--this is not working
Giorgi Nakeuri
  • 35,155
  • 8
  • 47
  • 75
Matt
  • 1
  • 1
  • 1
    Next time you post a question, _post the error_. This might help: http://stackoverflow.com/questions/10725705/how-to-create-table-with-identity-column – Nick.Mc Nov 15 '15 at 07:49
  • You **cannot** add `IDENTITY` to an existing column - you have to define a column as `IDENTITY` at the time the table is created – marc_s Nov 15 '15 at 08:52

0 Answers0