Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Question regarding ~ Create a table with AUTOINCREMENT field

Posted on 2006-06-19
4
Medium Priority
?
474 Views
Last Modified: 2008-01-09
Hi~

I was having the same issue create table with AUTOINCREMENT field as this person  (see the link)

http://www.experts-exchange.com/Databases/Sybase/Q_20787079.html

The answer told AUTOINCREMENT is not Sybase-syntax but however it was found in Sybase manual said it should work~

http://caribou.sybase.com/help/index.jsp?topic=/com.sybase.help.iq_12.6.iqref/html/iqref/iqref805.htm

Does the manual means working in Sybase IQ only? because the expert answered it didnt work on Sybase ASE.   I am confused~

Thank you.
0
Comment
Question by:mlin125
4 Comments
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 100 total points
ID: 16956306
Yes. They're different products. In ASE you want an "identity" column.
0
 

Assisted Solution

by:ashrefcp
ashrefcp earned 100 total points
ID: 17000148
for sybase ase, you will need to created table as follows:

create table t1(
c1 numeric(5,0) identity,
c2 char(20)
go

identify column should be of numeric(p,s) datatype with a scale of 0 upto ASE version 12.5.2 and in ASE 12.5.3(mostly) and ASE 15 even an integers can be used.

hope this clarifies,

/ashref
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Your business may be under attack from a silent enemy that is hard to detect. It works stealthily in the shadows to access and exploit your critical business information, sensitive confidential data and intellectual property, for commercial gain. T…
The decision to migrate to the cloud is not a simple one—many factors, such a cost, ease of use, and ongoing maintenance come into play. The goal is always for cloud platforms to make storage and backups more seamless and effective. Here’s a look at…
Integration Management Part 2
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question