Вы не можете (напрямую).Реляционные базы данных не имеют массивов;у них есть таблицы (отношения) и отношения между ними.Следовательно, в SQL нет понятия массива.
Вы можете сделать что-то вроде:
create table foo
(
id int not null primary key ,
col_01 varchar(200) null ,
col_02 varchar(200) null ,
...
col_nn varchar(200) null ,
)
, но это ненормально , нарушив 1-ая нормальная форма : в ней есть повторяющиеся группы.
Требуемая схема выглядит примерно так:
create table book
(
id int not null primary key , -- primary key
isbn varchar(32) null ,
title varchar(80) not null , -- can't use title as a key as titles are not unique
)
-- you might have multiple copies of the same book
create table book_copy
(
book_id int not null ,
copy_number int not null ,
primary key ( book_id , copy_number ) ,
foreign key ( book_id ) references book(id) ,
)
create table customer
(
id int not null primary key ,
surname varchar(32) not null ,
name varchar(32) not null ,
)
create table customer_has_book
(
customer_id int not null ,
book_id int not null ,
copy_number int not null ,
primary key ( customer_id , book_id , copy_number ) , -- customer+book+copy number is unique
unique ( book_id , copy_number ) , -- a given copy may only be borrowed one at a time
foreign key ( customer_id ) references customer(id) ,
foreign key ( book_id , copy_number) references book_copy(book_id,copy_number) ,
)