| От | Thomas Kellerer |
|---|---|
| Тема | Re: sql disaster - subquery error but delete continues |
| Дата | |
| Msg-id | i6d019$gto$1@dough.gmane.org обсуждение исходный текст |
| Ответ на | sql disaster - subquery error but delete continues (Greg Caulton <caultonpos@gmail.com>) |
| Список | pgsql-sql |
Greg Caulton, 10.09.2010 11:46: > delete from form_record_details where form_record_id in (select form_record_id from forms where form_id= 40003656) > > Seems fine at 1am. > > However the subquery has a typo in it - there is no form_record_id in the forms table > > But rather than psql throwing an error... > > it deletes every row in the form_record_details table > > please tell me this is fixed since 8.3 This is not a bug. I assume there is a form_record_id in the table form_record_details. As you have not used table prefixes or aliases, youare simply referencing the form_record_id from the "outer" table in the subquery. Thomas
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера