| От | Kenneth Gonsalves |
|---|---|
| Тема | finding if a foreign key is in use |
| Дата | |
| Msg-id | 0406290618410W.02481@thenilgiris.com обсуждение исходный текст |
| Ответы |
Re: finding if a foreign key is in use
|
| Список | pgsql-sql |
in my app i have a table where the id serves as a foreign key for one or more other tables. if i want to delete a row in the table, i currently search the other tables where this table is referenced to see if the row is in use - and then, if not in use, permit deletion. Now if i want the delete button in my app to be disabled whenever a row that is in use is selected, searching the database every time would dramatically slow down the app. is there some sql query that will immediatly give an answer as to whether the row is in use or not? -- regards kg http://www.onlineindianhotels.net - hotel bookings reservations in over 4600 hotels in India http://www.ootygolfclub.org
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера