Solved

Question regarding ~ Create a table with AUTOINCREMENT field

Posted on 2006-06-19
4
464 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Check out this step-by-step guide for asking an anonymous question on Experts Exchange.
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

752 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