?
Solved

Question regarding ~ Create a table with AUTOINCREMENT field

Posted on 2006-06-19
4
Medium Priority
?
472 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 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

719 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