Re: sequences and auto_increment

2007-01-02 Thread Ken Brown
but this would make my queries more complex, since to get the id of a skill (italian is competenza) will require querying two fields. It's true that I can simulate sequences with a table with auto_increment, but this means I need to insert a record before in such table to get the new id and

Re: sequences and auto_increment

2007-01-02 Thread Martijn Tonies
t; > > > > Thanks for your suggestion, but this would make my queries more complex, since > to get the id of a skill (italian is competenza) will require querying two > fields. > It's true that I can simulate sequences with a table with auto_increment, but > this means

Re: sequences and auto_increment

2007-01-02 Thread Luca Ferrari
za + id_competenza will be. > Thanks for your suggestion, but this would make my queries more complex, since to get the id of a skill (italian is competenza) will require querying two fields. It's true that I can simulate sequences with a table with auto_increment, but this means I n

Re: sequences and auto_increment

2007-01-02 Thread Brent Baisley
ari" <[EMAIL PROTECTED]> To: Sent: Tuesday, January 02, 2007 8:54 AM Subject: sequences and auto_increment Hi all, I'm new to MySQL coming from PostgreSQL backgroud. I'd like to know how to obtain the same effect of a sequence + concat as default value of a table in mys

Re: sequences and auto_increment

2007-01-02 Thread Martijn Tonies
by a string "comp-06" and the next value of a > sequence (similar to auto_increment). In MySQL there're no sequences, or > better, there's only an auto_increment action on an int field. How can I > obtain the same effect of the concatenation of a sequence and a string

sequences and auto_increment

2007-01-02 Thread Luca Ferrari
sequence (similar to auto_increment). In MySQL there're no sequences, or better, there's only an auto_increment action on an int field. How can I obtain the same effect of the concatenation of a sequence and a string? Thanks, Luca -- MySQL General Mailing List For list archives: ht

4 byte utf8 sequences

2006-06-13 Thread Christopher Key
Any ideas on whether and when MySQL is likely to support 4 byte utf8 sequences? Chris Key

Re: sequences

2006-03-21 Thread Martijn Tonies
Hello Chad, >Does mysql have sequences? No, it does not. >If not what is the functional equivalent? auto-increment would be the closest. Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL Server Upscene Productions http://www.upscene.com M

sequences

2006-03-21 Thread ChadDavis
Newbie question. Does mysql have sequences? If not what is the functional equivalent?

Re: Counting string sequences in row(s)

2005-04-30 Thread Smelly Socks
beginning or ends of lines, and anywhere in between. Sometimes spaces seperate sequences, but not always. I can't look for 3 "W"s together because sometimes a sequence is 3 of them, but sometimes it is 23 of them of 5 of them, etc. Any given sequence will never exceed 200 chars

Re: counting sequences

2004-11-22 Thread Michael Stassen
[EMAIL PROTECTED] wrote: Hi! I need to use SQL to count some sequences. We have taken a short snapshot of 1 year for people registered in programs. So we have data in a table like so: ID m1 m2 m3 m4 m5 m6 m7m8 m9 m10 m11 m12 The "m1", "m2", "m3" refers to month 1,

counting sequences

2004-11-21 Thread starr
Hi! I need to use SQL to count some sequences. We have taken a short snapshot of 1 year for people registered in programs. So we have data in a table like so: ID m1 m2 m3 m4 m5 m6 m7m8 m9 m10 m11 m12 The "m1", "m2", "m3" refers to month 1, month2, month3, etc

Sequences and Synomyms

2004-10-19 Thread lakshmi.narasimharao
Hi, I am new to mysql. I want to create sequences in mysql 4.0 which should be equivalent to oracle sequences. I gone through the mysql manual, Auto_Increment(), C API mysql_insert_id() and LAST_INSERT_ID() are there for sequences. Last_insert_id() gives the last value. I want actual

Re: Sequences and Synomyms

2004-10-19 Thread Martijn Tonies
Hello, > I am new to mysql. I want to create sequences in mysql 4.0 which > should be equivalent to oracle sequences. I gone through the mysql > manual, Auto_Increment(), C API mysql_insert_id() and LAST_INSERT_ID() > are there for sequences. Last_insert_id() gives the last val

Sequences and Synomyms

2004-10-19 Thread lakshmi.narasimharao
Hi, I am new to mysql. I want to create sequences in mysql 4.0 which should be equivalent to oracle sequences. I gone through the mysql manual, Auto_Increment(), C API mysql_insert_id() and LAST_INSERT_ID() are there for sequences. Last_insert_id() gives the last value. I want actual

Re: MySQL implementation of Oracle sequences

2004-10-15 Thread David Griffiths
ion and how you handled the implementation equivalent of Oracle sequences in MySQL. Our application uses a bunch of Oracle sequences to keep ID uniqueness for each sequence type. For example, we have: UserIDSequence NodeIDSequence etc. When we create new records, we first ask the Oracle sequen

MySQL implementation of Oracle sequences

2004-10-15 Thread Kenneth Lim
Hello - I was wondering if others have had to deal with an Oracle to MySQL migration and how you handled the implementation equivalent of Oracle sequences in MySQL. Our application uses a bunch of Oracle sequences to keep ID uniqueness for each sequence type. For example, we have

RE: SEQUENCES

2003-12-15 Thread Tobias Asplund
On Mon, 15 Dec 2003, Peter Lovatt wrote: > Try > > Insert INTO `table` ( `inc_field` ) values (10) > > the auto inc field will then generate the next sequential numbers > > HTH > > Peter Or just use ALTER TABLE table AUTO_INCREMENT=10 That way you don't have to enter a record jus

RE: SEQUENCES

2003-12-15 Thread Graham Little
Hi Chris, Thanks for your help, i will find another way around it. Graham -Original Message- From: Chris Nolan [mailto:[EMAIL PROTECTED] Sent: 15 December 2003 14:13 To: Graham Little Cc: '[EMAIL PROTECTED]' Subject: Re: SEQUENCES Hi, As far as I know, definitely not. Ho

RE: SEQUENCES

2003-12-15 Thread Peter Lovatt
Try Insert INTO `table` ( `inc_field` ) values (10) the auto inc field will then generate the next sequential numbers HTH Peter -Original Message- From: Graham Little [mailto:[EMAIL PROTECTED] Sent: 15 December 2003 14:01 To: '[EMAIL PROTECTED]' Subject: SEQUENC

RE: SEQUENCES

2003-12-15 Thread Graham Little
I looked in the documentation but could not find any mention of SEQUENCES. The AUTO_INCREMENT documentation seems to say that you can change a server variable to adjust the incremented count, but unless i can put an equation into their, i don't see how changing that would help. thanks G

Re: SEQUENCES

2003-12-15 Thread Chris Nolan
Hi, As far as I know, definitely not. However, you could use an AUTO_INCREMENT field as the independent variable for some application-level function you use to generate the values in the sequence. Best regards, Chris Graham Little wrote: I was wondering whether it was possible to make and AU

RE: SEQUENCES

2003-12-15 Thread Jay Blanchard
[snip] I was wondering whether it was possible to make and AUTO_INCREMENT field instead of always adding 1 and starting at zero, into a SEQUENCE type field so that it is say a 10 digit integer and numbers are created according to the SEQUENCE. [/snip] I was wondering if you had tried it in a tes

SEQUENCES

2003-12-15 Thread Graham Little
I was wondering whether it was possible to make and AUTO_INCREMENT field instead of always adding 1 and starting at zero, into a SEQUENCE type field so that it is say a 10 digit integer and numbers are created according to the SEQUENCE. thanks Graham

Re: MySQL -- Sequences -- Do they exist

2003-12-10 Thread Andrey Subbotin
Hello noel. Wednesday, December 10, 2003, 5:09:30 PM, you wrote: nkmdi> If not is there anyway to automatically generate primary keys for nkmdi> tables in MySQL. CREATE TABLE ttt ( id int not null auto_increment primary key, name varchar(100) not null ); Please note "auto_incremen

Re: MySQL -- Sequences -- Do they exist

2003-12-10 Thread Victoria Reznichenko
[EMAIL PROTECTED] wrote: > > I am looking to create a sequence to use as a primary key for a table, I > have read about them on the mysql website but can?t seem to get them work= > ing. > Do they exist for version 4.1 and if so could someone give me some sampl= > e > code. If not is there anyway

Re: MySQL -- Sequences -- Do they exist

2003-12-10 Thread Martijn Tonies
Hi Noel, > I am looking to create a sequence to use as a primary key for a table, I > have read about them on the mysql website but can?t seem to get them working. > Do they exist for version 4.1 and if so could someone give me some sample > code. If not is there anyway to automatically generate

MySQL -- Sequences -- Do they exist

2003-12-10 Thread noel . king2
Hello I am looking to create a sequence to use as a primary key for a table, I have read about them on the mysql website but can?t seem to get them working. Do they exist for version 4.1 and if so could someone give me some sample code. If not is there anyway to automatically generate primary ke

Re: How to generate data sequences simple way?

2003-11-07 Thread Martijn Tonies
unter` smallint(5) unsigned NOT NULL default '0', >... > ); > > For some purposes I need to initialize frequently the table for time > sequences with constant time step e.g. since 2003-11-06 8:00 to > 2003-11-06 12:00 with time step 15 minutes. It means I need

How to generate data sequences simple way?

2003-11-07 Thread Petr
default '0', ... ); For some purposes I need to initialize frequently the table for time sequences with constant time step e.g. since 2003-11-06 8:00 to 2003-11-06 12:00 with time step 15 minutes. It means I need to do following INSERT commands: INSERT INTO couters (..., '2003-11-

Disabling special character sequences

2003-07-30 Thread Jim McAtee
Is there any means of running MySQL (3.23, mostly MyISAM tables running on Win2k Server) so that escaped character sequences (those preceded by a backslash \) are _not_ interpretted as anything other than literals? We're trying to port a large number of web applications that previously us

Re: Finding holes in autoinc sequences

2002-05-31 Thread Richard Clarke
; Sent: Friday, May 31, 2002 6:07 PM Subject: RE: Finding holes in autoinc sequences > Richard, > > Say, that's really good! > I'm still not used to taking advantage of those variables. Clever. > Also, I think you can remove all but the rows showing gaps by adding a gr

RE: Finding holes in autoinc sequences

2002-05-31 Thread Kevin Fries
, @flag:=IF(@b=id,id,"MISSING") from seq group by id having id <> range; > -Original Message- > From: Richard Clarke [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 30, 2002 7:48 PM > To: [EMAIL PROTECTED] > Subject: Re: Finding holes in autoinc sequences > >

Re: Finding holes in autoinc sequences

2002-05-30 Thread Richard Clarke
TECTED]> To: "'mos'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, May 30, 2002 10:56 PM Subject: RE: Finding holes in autoinc sequences > A simple and fast way to find the gaps is to use a self LEFT JOIN, such as: > > select a.id from seq a

RE: Finding holes in autoinc sequences

2002-05-30 Thread Kevin Fries
ailto:[EMAIL PROTECTED]] > Sent: Thursday, May 30, 2002 1:18 PM > To: [EMAIL PROTECTED] > Subject: Finding holes in autoinc sequences > > > I'm going to be tackling this problem in a few days and I > wanted to bounce > it off of a few MySQL heads first to see if it g

Re: Finding holes in autoinc sequences

2002-05-30 Thread Jeremy Zawodny
On Thu, May 30, 2002 at 03:17:53PM -0500, mos wrote: > I'm going to be tackling this problem in a few days and I wanted to bounce > it off of a few MySQL heads first to see if it generates any ideas. (or > sparks?) > > Here's is the problem. I have an auto-inc column and rows will get deleted

Finding holes in autoinc sequences

2002-05-30 Thread mos
I'm going to be tackling this problem in a few days and I wanted to bounce it off of a few MySQL heads first to see if it generates any ideas. (or sparks?) Here's is the problem. I have an auto-inc column and rows will get deleted from the table and of course it will create a hole in the seque

Features (Sequences, views, triggers/rules)

2002-03-18 Thread Michael L. Artz
I am currently migrating my DB and associated apps to MySQL from Postgres, and I am running into a couple of limitations that I couldn't figure out how to work around from the docs, mostly stemming from sequences, views, and triggers. I am currently using the "stock" RH7.1 MySQL

Re: does MySql support Procedures, Events and Sequences

2001-11-20 Thread Benjamin Pflugmann
nd its child nodes are indexes on all tables etc. > I am confused weather MySql support Procedures, It doesn't support Stored Procedures. > Events I am not sure what you mean with Events, but for every meaning I could assume, the answer is: MySQL doesn't support it. > and Sequ

Re: does MySql support Procedures, Events and Sequences

2001-11-19 Thread Omkar
and Sequences. If there is a support i can also include these nodes in my Tree. Please respond to this as it is high priority for me. Thanks & Regards, Omkaram Sangem iNuCom (India) Ltd Secunderabad:53 Phones:+91-40-7893817/7812959 Fax:+91-40-7809071 Email: [EMAIL PROTECTED] www.inucom

Counting Sequences Solution

2001-10-04 Thread Bruce Collins
Hello, A solution to my problem: "For an athlete's first entry in the database I need a column value of 1. The second performance entry of the same athlete would have a value of 2. And so on." has been posted by Paul Dubois: ALTER TABLE tbl_name ADD seqnum INT UNSIGNED NOT NULL AUT

Re: Counting Sequences Clarified

2001-10-02 Thread Paul DuBois
At 9:04 PM +1000 10/2/01, Bruce Collins wrote: >Hello, >Thank's for your interest Paul. I did a poor job >of explaining my problem. Here is another go: >For an athlete's first entry in the database I need a column >value of 1. The second performance entry of the same athlete >would have a value of

RE: Counting Sequences Clarified

2001-10-02 Thread Haapanen, Tom
ight now I don't understand the problem well enough to convince me that such maintenance would be worthwhile ... Tom Haapanen [EMAIL PROTECTED] -Original Message- From: Bruce Collins [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 02 October, 2001 07:04 To: [EMAIL PROTECTED] Subject: Cou

Counting Sequences Clarified

2001-10-02 Thread Bruce Collins
Hello, Thank's for your interest Paul. I did a poor job of explaining my problem. Here is another go: For an athlete's first entry in the database I need a column value of 1. The second performance entry of the same athlete would have a value of 2. And so on. I need to apply this retrospectively t

Re: Counting Sequences

2001-10-01 Thread Paul DuBois
At 12:23 PM +1000 10/2/01, Bruce Collins wrote: >Hello, >I have a mySQL database with a large table of >athletic performances where every athlete has >a row for every performance. My problem is to >make a column which is a sequential count of >each athlete's performances. The table is in >chronolo

Counting Sequences

2001-10-01 Thread Bruce Collins
Hello, I have a mySQL database with a large table of athletic performances where every athlete has a row for every performance. My problem is to make a column which is a sequential count of each athlete's performances. The table is in chronological order. Have been trying with PHP but I am very mu

Re: sequences or auto_increment column????

2001-07-27 Thread Dennis Salguero
I prefer to use Auto_Increment for ease of use. In addition, I don't think that MySQL supports sequences outright (like you may be used to with Oracle). There are some workarounds availabe within the MySQL manual, do a search with "sequences". Goo

sequences or auto_increment column????

2001-07-27 Thread Siomara Pantarotto
Does anybody know which approach is better with mysql: Create sequences for tables or an auto_increment columns??? and why??? Siomara _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Re: My SQL Database and escape sequences

2001-05-10 Thread Paul DuBois
_string.html http://www.mysql.com/doc/m/y/mysql_real_escape_string.html If you're asking what the allowable escape sequences are: http://www.mysql.com/doc/S/t/String_syntax.html > >Regards, >Ravi -- Paul DuBois, [EMAIL PROTECTED] -

My SQL Database and escape sequences

2001-05-10 Thread VVM Ravikumar Sarma Chengalvala
Can some one let me know all possible ways to provide escape characters in MYSQL inserts. I am using C API. Regards, Ravi Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at h

Re: ID numbers: auto-increment or sequences ?

2001-04-11 Thread Steve Werby
"Gunnar von Boehn" <[EMAIL PROTECTED]> wrote: > Can I somehow say that > in database (1) the autovalues should start with 1 > and in database (2) maybe with 1 ? Yes. See the previous post from Mike Blezien. What he didn't say is that yes, you can have two identically structured tables w

ID numbers: auto-increment or sequences ?

2001-04-11 Thread Gunnar von Boehn
Hi, For identification of each record in our database we use an 'autovalue'-column. It seems that this was a rather bad idea. As we are now planning to run two individual databases. In both of them records shall be written. Later we plan to merge them together again. But how can we do this? Wi

Re: ID numbers: auto-increment or sequences ?

2001-04-11 Thread MikeBlezien
On Wed, 11 Apr 2001 14:42:47 +0200, Gunnar von Boehn <[EMAIL PROTECTED]> wrote: with MySQL 3.23+ you can now assign the auto_increment start value, when creating the table: AUTO_INCREMENT = 1 >>For identification of each record in our database >>we use an 'autovalue'-column. >>It see