Lay,

Lay Hoon Tan wrote:
Does MySQL support "serial" (auto-increment a number) and currency types ?

1. You can create an auto-increment field:



mysql> create table t1 (a int not null primary key auto_increment, b char(10)); Query OK, 0 rows affected (0.02 sec)

mysql> insert into t1 (b) values ('rec1'),('rec2'),('rec3');
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> select * from t1;
+---+------+
| a | b    |
+---+------+
| 1 | rec1 |
| 2 | rec2 |
| 3 | rec3 |
+---+------+
3 rows in set (0.01 sec)


2. There is no special MONEY type in MySQL. But you can use DECIMAL for this purposes. We used DECIMAL(12,2) to store money in an ISP accounting system several some time ago. It worked very fine.


Hope this helps.


It seems that both are not supported but I would just like to confirm this.

Thank you



--
For technical support contracts, visit https://order.mysql.com/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Alexander Barkov <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
/_/  /_/\_, /___/\___\_\___/   Izhevsk, Russia
       <___/   www.mysql.com   +7-912-856-80-21


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to