Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In postgres Updates 0 rows for matching record

Tags:

postgresql

We were trying to update a record in our database as below and the row was not getting updated. No error was shown neither on the command promt nor in the logs

STEP 1:

SELECT yrd_cuttoff FROM yrd_yield_room_details WHERE yrd_yrd_key=1491;  
yrd_cuttoff
________________
 N
(1 row)

STEP 2:

UPDATE yrd_yield_room_details SET yrd_cuttoff='NC' WHERE yrd_yrd_key=1491; 

UPDATE 0

STEP 3:

SELECT yrd_cuttoff FROM yrd_yield_room_details WHERE yrd_yrd_key=1491;  

yrd_cuttoff
________________
 N
(1 row)
like image 236
Sandeep Avatar asked Nov 10 '22 11:11

Sandeep


1 Answers

Check if there is no rules on this table. See this and this.

like image 70
wind_gan Avatar answered Dec 27 '22 01:12

wind_gan