Jump to content

Mons

Members
  • Posts

    2
  • Joined

  • Last visited

Mons's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thankyou aspnetguy!!That works very well indeed
  2. Hi, another newby here! and still learning sqlI am creating a database in sql server 2000 using Query Analyzer and I would like to have a column auto increment, Is this possible in the CREATE TABLE statement, or must it be handled in the program layer? and if the sql can handle it how would I go about it?The column in question is "isIssueCode" and my CREATE statement is below.if exists (select * from dbo.sysobjects where id = object_id(N'[issue]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [issue]GOCREATE TABLE [issue] ( [isIssueCode] [nchar] (10) NOT NULL , /* This column */ [isContactCode] [nchar] (10) NOT NULL , [isTCStaffCode] [nchar] (10) NOT NULL , [isTCReference] [nvarchar] (50) NOT NULL , [isDateRecieved] [datetime] NOT NULL CONSTRAINT [DF_Issue_isDateRecieved] DEFAULT (getdate()), [isDateClosed] [datetime] NOT NULL CONSTRAINT [isDateClosed] DEFAULT ('2777-07-07'), CONSTRAINT [PK_Issue] PRIMARY KEY CLUSTERED ( [isIssueCode] ))GOThankyou in advanceMons
×
×
  • Create New...