cted (0.00 sec)
mysql> SELECT @i:= @i + 1 AS row, animals.* FROM animals;
+--++-+
| row | id | name|
+--++-+
|1 | 1 | dog |
|2 | 2 | cat |
|3 | 3 | penguin |
|4 | 5 | whale |
|5 | 6 | ostrich |
+--++-+
5 rows in set (0.00 sec)
Michael
-
Hi, all
I follow the example:
CREATE TABLE animals (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO animals (name) VALUES
('dog'),('cat'),('penguin'),
('lax'),('whale'),('ostrich');
SELECT * FROM animals;
The thing is that
Hello,
I am currently creating a multi-user system which has approximately
15 tables. Each table has a primaryID as well as the userID of who
this record belongs to. Therefore, when I perform a SELECT I am
checking (potentially) both the primaryID column as well as the
userID. I'm using MyISAM ta
Hi All
How do i use RowId 's in MYSQL..
Can anyone throw some light on it
Regards,
-Arul
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive
get the row id of a row in MySQL?
AFAIK, there is no such concept like row id in MySQL. The usual way
to is to add an AUTO_INCREMENT INT to the table and use that.
Regards,
Benjamin.
--
[EMAIL PROTECTED]
-
Before post
Do anyone know how to select or get the row id of a row in MySQL?
thank you
Borus
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To
: [EMAIL PROTECTED]
- Original Message -
From: Peter Dunham <[EMAIL PROTECTED]>
To: Ing. Gustavo Edelstein <[EMAIL PROTECTED]>; Rick Emery
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, January 14, 2002 2:30 PM
Subject: RE: ROW ID
> You need to specify a
AIL PROTECTED]]
Sent: 14 January 2002 16:58
To: Rick Emery; [EMAIL PROTECTED]
Subject: Re: ROW ID
What I mean is to get the internal id of every existing row in a table.
Thanks.
Ing. Gustavo A. Edelstein
Tech. Mgr.
Equiplus Argentina S.A.
__
Visit us On Line
]
Technical: [EMAIL PROTECTED]
Web related: [EMAIL PROTECTED]
General: [EMAIL PROTECTED]
- Original Message -
From: Rick Emery <[EMAIL PROTECTED]>
To: 'Ing. Gustavo Edelstein' <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, January 14, 2002 1:27 PM
Subject:
If the value was set with AUTO_INCREMENT, then immediately after inserting
the row, do:
SELECT last_insert_id() AS myvalue;
-Original Message-
From: Ing. Gustavo Edelstein [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 10:03 AM
To: [EMAIL PROTECTED]
Subject: ROW ID
Hi list
Hi list members,
How to get the unique row id for a row in a table ?
Thanks.
Ing. Gustavo A. Edelstein
Tech. Mgr.
Equiplus Argentina S.A.
__
Visit us On Line at www.equiplus.com
Email addresses:
Operations: [EMAIL PROTECTED]
Consulting: [EMAIL PROTECTED
11 matches
Mail list logo