473,486 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to use CREATE SEQUENCE in MySQL

1 New Member
how to create a sequence menttioned below..for number generators.

Expand|Select|Wrap|Line Numbers
  1. CREATE SEQUENCE  sequ
  2.   START WITH 1
  3.   INCREMENT BY 1
Jul 19 '07 #1
4 30377
Atli
5,058 Recognized Expert Expert
Hi, and welcome to TSDN!

The 'CREATE SEQUENCE' syntax does not work in MySQL.
I looked around a bit and found it in a MaxDB reference manual.
Jul 19 '07 #2
pbmods
5,821 Recognized Expert Expert
Heya, kudinesh.

MySQL numeric primary keys can be given an auto_increment property that may be what you're looking for:

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE
  2.     `counter`
  3.     (
  4.         `key` int(10) unsigned not null auto_increment primary key
  5.     );
  6.  
Jul 22 '07 #3
prasadshaha93
1 New Member
how to create a sequence menttioned below..for number generators.


CREATE SEQUENCE sequ
START WITH 1
INCREMENT BY 1
i do this but i hav syntax error , i am using SQLYOG mysql GUI
so plz give me idea

solve my problem

Thanking You ,
Sep 8 '07 #4
pbmods
5,821 Recognized Expert Expert
Heya, prasadshaha93. Welcome to TSDN!

Try reading the other posts in this thread.
Sep 8 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3923
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
3
2014
by: Michael Lauzon | last post by:
This is not for a class, I have a group on SourceForge, this is what one of the Developers is asking; the more advanced you can make it right off all the better!: Can someone please create...
1
2071
by: Grant | last post by:
I'm trying to set up the Interchange 5.2 shopping cart (icdevgroup.org) to use the CREATE SEQUENCE functionality of pgsql properly and I'm having some trouble. The table is called order_items and...
0
1489
by: asnyder131 | last post by:
I'm a newby here as well as to mysql and coldfusion. I'm a business owner who had previously designed my own relational database system for my company (smartware) and used it sucessfully for many...
1
5148
by: simun.selak | last post by:
On my local installation of DB2 on AS/400 (BTW., how do I find out which version od DB2 I have?) I have created these SQL statements: CREATE SEQUENCE a.seq AS INTEGER START WITH 8955 INCREMENT...
3
32177
by: chabrenas | last post by:
What I'm looking for is a lazy man's way to define a table structure, using the table headings row in a CSV file. I'd be happy to start with all fields being VARCHAR(50) or some such default, and...
1
2362
by: mithu0189479120 | last post by:
I am new in PHP & MYSQL. I have a multiple checkbox item in html form and want to create a new table by this checked item in an existing database with PHP code .
1
1500
by: cardeal | last post by:
Hi! I have a long field on a mysql table and I would like to create a new table (from the old one) with the (new) content distributed into several fields. Example: oldField: 1. pace paz...
1
2633
by: RAVINDRA NARAGA | last post by:
Sql>create sequence s1 increment by 1 start with 1; sql>select s1.nextval from dual; ans: Nextval -------- 1 but,how to get below output nextval --------- 2
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7132
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5439
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.