|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Autonumber for a column
I have a table called: tbl_hTar_User.
In it are these columns: username, pwd, realname, id, security I want the 'id' column to be both a primary key and at autonumber field so when a new user is added, they are automatically assigned an ID. I am using SQL Server Enterprise Manager. Any help would be greap. Thanks, Janusz
__________________
http://www.xlibris.co.uk http://janusz.monkey-it.co.uk |
|
#2
|
||||
|
||||
|
Code:
create table tbl_hTar_User ( username varchar(16) not null , pwd varchar(16) not null , realname varchar(80) not null , id integer not null primary key identity , security varchar(80) not null ) |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Autonumber for a column |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|