Solved

Question regarding ~ Create a table with AUTOINCREMENT field

Posted on 2006-06-19
4
448 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 25 total points
ID: 16956306
Yes. They're different products. In ASE you want an "identity" column.
0
 

Assisted Solution

by:ashrefcp
ashrefcp earned 25 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now