How can you create a column to be auto generated when creating a table ? is it possoble ?

Showing Answers 1 - 4 of 4 Answers

Hi!
    There are two ways to do it.
1. Go to design mode of a table. Click on a column to which you want to make auto genterted In its column Properties u will get Identity Specification. Select yes from here.
2 By query
CREATE TABLE TableNAme
(
   FieldName INT IDENTITY
)

  Was this answer useful?  Yes

There are two ways to auto generate the values of a column in a table
1) Default value: we can set a default value to column definition
2) Identity value: we can set an identity value with initial value and increment value to column definition.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions