Each time I try to change the one to an Identity column, it changes the
other to NOT an identity column.
Thanks, Mark
*** Sent via Developersdex http://www.examnotes.net ***Mark
No.
You cannot have more than one an identity column as well as updating
(identity) is not allowed.
You can generate your own an autoincrement colunm
create table #t
(
col1 int not null identity(1,1),
col2 as col1
)
insert into #t default values
select * from #t
Note: There are some "di

that there will not be gaps or duplicates
"Mark" <anonymous@.devdex.com> wrote in message
news:uGw12ikyFHA.1032@.TK2MSFTNGP12.phx.gbl...
> Hi - is it possible to have 2 Identity (auto increment) fields in table?
> Each time I try to change the one to an Identity column, it changes the
> other to NOT an identity column.
> Thanks, Mark
>
> *** Sent via Developersdex http://www.examnotes.net ***|||No.
Such situation never occurs in proper design
--
Regards
R.D
--Knowledge gets doubled when shared
"Mark" wrote:
> Hi - is it possible to have 2 Identity (auto increment) fields in table?
> Each time I try to change the one to an Identity column, it changes the
> other to NOT an identity column.
> Thanks, Mark
>
> *** Sent via Developersdex http://www.examnotes.net ***
>|||No. Please explain why you would want more than one IDENTITY column in
a table.
What can you do with 2 columns that you can't already do with 1?
David Portas
SQL Server MVP
--|||Hi,
Its not possible to have two identity columns in the same table.
However I have never seen it changing an existing identity column into
not an identity column. Can u pls send me the script.
Regards,
Shanmugam
Mark wrote:
> Hi - is it possible to have 2 Identity (auto increment) fields in table?
> Each time I try to change the one to an Identity column, it changes the
> other to NOT an identity column.
> Thanks, Mark
>
> *** Sent via Developersdex http://www.examnotes.net ***
No comments:
Post a Comment