Auto-Increment Field

mintelesync
mintelesync used Ask the Experts™
on
Hi,

I am using pervasive SQL Server. I am not sure of the syntax to create an auto-increment field.

The syntax that I am using is
CREATE TABLE repCat
  (repId                 UBIGINT IDENTITY(1,1),
   repCatName            VARCHAR(50),
   repCatOrder          UBIGINT,
   repCatFolder           VARCHAR(20),
 PRIMARY KEY (repId)
 )
but gives me problems. I was looking for documentation specific to syntax for pervasive. Haven't found anything. If anybody would help... I would be greatful.

Thanks in Advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
for auto increment field u can do this

create table <table>
(<field> int AUTO_INCREMENT DEFAULT '0')

Author

Commented:
skyshadow: Thank you for your response.But, I tried the it the way you have the syntax but didnot work .It gives an error at auto_increment. In the documentation of pervasive it says that a auto_increment field can be set,but does not give any examples. Hence I am lost.

Any help is really appreciated.

Minal
 
I figured out a way to do on my own. Thanx for your help any ways. Right syntax is
create table <table>
(<field> int identity)

No points to anyone.

mintelesync:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial