... arrays in fields ...
Posted by:
Matt Koch
Date: August 11, 2004 12:52PM
Hi there,
PostGreSQL apparently permits creation of arrays in table fields, like so:
CREATE TABLE Users (
ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
FirstName VARCHR(48),
LastName VARCHR(48),
Salaries FLOAT[]
);
The emphasis here is on "FLOAT[]", which is an array of FLOAT entries. This would be filled like so:
INSERT INTO Users (FirstName,LastName,Salaries)
VALUES (
'Matt',
'Koch',
'{100.20,200.30,300.40}'
);
The emphasis here is on "'{100.20,200.30,300.40}'", which is obviously an array. This way, a single field can hold more than one data item.
Does anyone know if this capability exists in MySQL 4.0.20 and higher? And if it does, whether MS-SQL can handle it as well (I will regrettably be forced to migrate to MS-SQL once I have the database going in MySQL - what a shame!).
Thanks,
Matt