SQLсервер в Linux -самостоятельное освоение пакета

         

Удаление ограничений



Листинг 7.10. Удаление ограничений

booktown=*# DROP INDEX books_id_pkey;

DROP

booktown=# CREATE TABLE new_books

booktown-# (id integer CONSTRAINT books_id_pkey PRIMARY KEY.

booktown(# title text NOT NULL.

booktown(# author_id integer.

booktown(# subjected integer):

NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'books_id_pkey'

for table 'new_books'

CREATE

booktown=# INSERT INTO new_books SELECT * FROM books:

INSERT 0 15

booktown=f ALTER TABLE books RENAME TO old_books:

ALTER

booktown=# ALTER TABLE new_books RENAME TO books;

ALTER



Содержание раздела