CREATE TABLE user (
...
columnName int ARRAY[7][7] DEFAULT null,
...
)
I have to create a table where one of the columns has to store a 7x7 array, but i can't figure it out!
Is it even possible in SQL?
-- UPDATE So, I've decided I am going to cheat it and store it as a TEXT and then with code I'll work with that string
SQL 2003 (and to a lesser extent SQL 99) provide array types, see for instance here: http://farrago.sourceforge.net/design/CollectionTypes.html I've used them extensively with PostgreSQL to simplify my designs. For clients that don't support array semantics yet, it's possible to provide views which "unnest" the arrays.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With