MySQL Forums
Forum List  »  Newbie

... 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

Options: ReplyQuote


Subject
Written By
Posted
... arrays in fields ...
August 11, 2004 12:52PM
August 13, 2004 09:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.