Solved

Question regarding ~ Create a table with AUTOINCREMENT field

Posted on 2006-06-19
4
468 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

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

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

Getting to know the threat landscape in which DDoS has evolved, and making the right choice to get ourselves geared up to defend against  DDoS attacks effectively. Get the necessary preparation works done and focus on Doing the First Things Right.
Why do some people recommend buying business VoIP from an ISP? What are the benefits to my company? What are the costs?
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

617 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