Inserting values into multidimensional arrays : Array Column Insert « Array « PostgreSQL






Inserting values into multidimensional arrays


postgres=#
postgres=# -- Inserting values into multidimensional arrays
postgres=# CREATE TABLE authors (id integer,titles text[][]);
CREATE TABLE
postgres=#
postgres=# INSERT INTO authors
postgres-#              VALUES (102,
postgres(#              '{{"J T", "T S"},
postgres'#                {"C D", "G E"},
postgres'#                {"A D", "A L"}}');
INSERT 0 1
postgres=#
postgres=# select * from authors;
 id  |                   titles
-----+---------------------------------------------
 102 | {{"J T","T S"},{"C D","G E"},{"A D","A L"}}
(1 row)

postgres=#
postgres=# drop table authors;
DROP TABLE
postgres=#
           
       








Related examples in the same category

1.Insert array data to table
2.Inserting array constants
3.Insert data for two dimensional array
4.Insert data for two dimensional array column