Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create an IDENTITY column

Status
Not open for further replies.

tconway

Technical User
Jul 15, 2002
14
US
I am new to Pervasive and am using
Pervasive.SQL V8
Service Pack 1 Release - March 2003

I am trying add an Identity column, something that should be very easy but cannot seem to find how to do it.

I see in the HELP that there exists datatypes IDENTITY AND SMALLIDENTITY, but how does one select these when adding a column? I have every datatype to select from (integer, float, char, etc. etc.) except the IDENTITY types. They are not on the list and I cannot find how to make a column autoincremnt and be an Identity column.

I would like to end up with an Identity column that will autoincrement so I can create a Primary Key index and, once that is done, create an index on a second field that I need indexed.

Thanks

Tim
 
Hi Tim

The identity column is available from the drop down list when you create a new table. It is not available for an existing table.

Thanks

Tim

 
You can also use SQL statements to create the table. For example:
create table (ID identity default 0, name char(10), address char(10), city char(20), state char(2), zip char(5))

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top