Re: Inserting data in composite types!

Поиск
Список
Период
Сортировка
От Markus Schiltknecht
Тема Re: Inserting data in composite types!
Дата
Msg-id 455864D3.4020904@bluegap.ch
обсуждение исходный текст
Ответ на Inserting data in composite types!  ("Rodrigo Sakai" <rodrigo.sakai@zanthus.com.br>)
Список pgsql-sql
Hi,

Rodrigo Sakai wrote:
> How can I insert a single row in this table???

INSERT INTO employee (emp_salary)  VALUES ((1000.00, '(2006/10/10, 2006/12/10)'));


BTW: are you sure you don't want to use foreign keys instead? Something 
like:

CREATE TABLE salaries (  id SERIAL PRIMARY KEY,  salary numeric(10,2) NOT NULL,  t_date t_time NOT NULL
);

CREATE TABLE employee (  employee_id SERIAL PRIMARY KEY,  name TEXT NOT NULL,  salary INT NOT NULL REFERENCES
salaries(id)
);

Regards

Markus


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Rodrigo Sakai"
Дата:
Сообщение: Inserting data in composite types!
Следующее
От: Shane Ambler
Дата:
Сообщение: Re: Inserting data in composite types!