I would like to add a column in one of my tables that is an exact copy of (or alias) for another column, except that it has a different name.

Why? I'm joining two tables that were previously separate and I want to use 1 main idexing column (e.g. the same numbering scheme). However a whole lot of scripts and webpages (PHP and Perl) from these previously separate tables like to use their own index column (e.g. one table previously used column name "id" and the other used "job_num"). I'm combining these to keep the numbering in sync.

Ideally this would all take place within the mysql table itself (e.g. add an entry and both columns get the same autoindex number).

E.g. from first table:
Field | Type | Null | Key | Default | Extra |
+-----------------+--------------------------+------+-----+---------------------+----------------+
| job_num | int(5) unsigned zerofill | | PRI | NULL | auto_increment |

From my other table:
+-----------------+--------------+------+-----+--------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+--------------+----------------+
| id | int(11) | | PRI | NULL | auto_increment |

Thanks in advance.

Mike


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to