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.
| Author |
Topic |
|
abundant_lyfe
Starting Member
10 Posts |
Posted - 2007-02-19 : 10:52:41
|
HiWorking with SQL Server 2005I am trying to create a table with the following codecreate table department (dept_id smallint unsigned not null auto_increment, name varchar(20) not null, constraint pk_department primary key (dept_id) )but keep coming up with an error. I suspect that I am trying to use mysql (which I don't want to use!) instead of sql, but can't find the changes I need to make.Thank you in advance  |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-19 : 11:29:01
|
| [code]CREATE TABLE Department( Dept_ID SMALLINT IDENTITY(1, 1) PRIMARY KEY CLUSTERED, Name VARCHAR(20) NOT NULL)[/code]Peter LarssonHelsingborg, Sweden |
 |
|
|
abundant_lyfe
Starting Member
10 Posts |
Posted - 2007-02-19 : 11:36:39
|
| Thank you Peter |
 |
|
|
|
|
|