Skip to content
Advertisement

Tag: triggers

Delete with inner join and trigger throw error: Can’t update table ‘table_b’ in stored function/trigger

Why the following error (Can’t update table ‘table_b’ in stored function/trigger because it is already used by statement which invoked this stored function/trigger) appears after i try to delete with inner join? Can i solve it? Answer I don’t see the point for a trigger here. The functionality you want can be achieved by just adding the on delete cascade

MySQL Default Record from Table

I use MySQL 5.6 and I have 3 tables. Two of them are a list of data, and the third table is used for a relationship between them. In the third table I would like to identify a default record for each id1, so I added a column named predt to let me know which record is the default one.

Order of cascaded deletes in postgres

I encountered a problem which makes me suspect Postgres deletes rows from dependent tables (ON DELETE CASCADE) only after it already deleted the original row. I have these tables: I created a trigger (before delete) on the function_inclusion table: Let’s say I have 2 functions and a function_inclusion: When I delete the super_function: I get this error: So it seems

oracle trigger and json_value

Hi I want to store some values from :new.payload via an trigger. this works in sql-developer but not in a trigger… select json_value(‘{“timestamp”:”2019-05-09T14:00:00Z”,”value”:0,”unit”:”W/m²”}’, …

Advertisement