473,548 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ 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 30383
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
3928
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 version of this document can be found at: http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download
3
2018
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 some MySQL to create the first table: the players table. It will need to include (as a minimum): - ID (unique)
1
2074
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 the field that should sequence is called autonumber. The Interchange DB config file looks like this for my order_items table: Database...
0
1495
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 years. I have recently paid for a new web based system and decided to go with a programmer that built a coldfusion mx/mysql system. There are a...
1
5150
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 BY 1 INSERT INTO a.table1 (id, name) SELECT (next value for a.seq, name) from a.table2
3
32183
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 then making appropriate changes via PHPmyAdmin later. The reason for being this lazy is the number of fields that I need to define - the CSV file is...
1
2366
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
1508
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 peace Friede ... 2. luce luz light Licht ... 3. rege rei king König ...
1
2641
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
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7444
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7711
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7467
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7805
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1054
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
755
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.