Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Autonumber

Author  Topic 

kid_on_the_block
Posting Yak Master

172 Posts

Posted - 2006-03-21 : 03:29:09
Hi

When we open the table in design view in access , we get to see the Data type as Autonumber there.

How to find out the same in SQL Server , if a particualar column fas been made autonumber & how to make it also .


Thanks


Bharat Butani

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-03-21 : 03:45:12
In SQL Server there is somthing called as Indenity..

When you open the Table in the Design mode, in the property section you can see the Indenity...


Sucess Comes to those who Believe in Beauty of their Dream..
Go to Top of Page

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2006-03-21 : 03:47:48
In Enterprise manager when u open a table in design view, at the bottom there is identity field. if that is set to yes then the column is autonumber else not. You can toggle it to yes if you want to set autonumber to anyfield.


Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-21 : 04:51:33
Use this to know tables with identity columns
SELECT table_name, column_name as Identity_Column
FROM information_schema.columns
WHERE COLUMNPROPERTY(OBJECT_ID(table_name),
column_name,'IsIdentity')=1


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -