Re: May I have an assistance on CREATE TABLE Command
От | James Kitambara |
---|---|
Тема | Re: May I have an assistance on CREATE TABLE Command |
Дата | |
Msg-id | 564943.99946.qm@web27907.mail.ukl.yahoo.com обсуждение исходный текст |
Ответ на | Re: May I have an assistance on CREATE TABLE Command ("Bart Degryse" <Bart.Degryse@indicator.be>) |
Ответы |
Re: May I have an assistance on CREATE TABLE Command
Re: May I have an assistance on CREATE TABLE Command Re: May I have an assistance on CREATE TABLE Command |
Список | pgsql-sql |
Thank you ! But I think that there is a solution. If it happens that you have the following data in your tables REGION -------------------------------------- region_id | region_name -------------------------------------- 11 | Dodoma 22 | Tabora 99 | Dar es Salaam THIS ROW WAS SUPPOSED TO BE: '33', 'Dar es Salaam' DISTRICT ------------------------------------------------------------ dist_id | dist_name | region_id ------------------------------------------------------------ 001 | Kongwa | 11 002 | Ilala | 99 003 | Temeke | 99 003 | Kinondoni | 99 For this UPDATE I wanted, when I change the region _id from '99' to '33' of the last ROW in REGION table AUTOMATICALLY to change the last three ROWS of the DISTRICT table which reference to '99', 'Dar es Salaam'. If I do this, I will get the error message "You can not change region_id other tables are reference to it. HOW CAN DO THIS? (AUTOMATIC UPDATE OF FOREIGN KEY)
|
В списке pgsql-sql по дате отправления: