Questions tagged as 'trigger'

1
answer

Help with trigger insert

I'm new to SQL and I want to make a page as a new user record, and that this information is stored in a table, (this part I already have) The problem is that when creating a new user, I have 2 tables, one of companies and another of users, then...
asked by 18.12.2018 / 18:29
0
answers

Table mutating when trying to modify values

In my database I have some procedures and some triggers in the table relation. I want that when I finish making a loan, that is, when I update the return date ('Fecha_Devolución') , my serial number that is a primary value, can change its...
asked by 23.11.2018 / 06:30
0
answers

Obsolete code? PostgreSQL - Triggers - SQL - It does not work

I currently have an obsolete postgresql code. I do not have much experience with functions or triggers, I only ask for help to get possible obsolete commands or functions since it is a somewhat old code and I am working with a server in postg...
asked by 13.11.2018 / 20:31
0
answers

Migrate Triggers to different databases in Laravel

I have a problem, it turns out that I work with laravel and migrate several tables to different databases thanks to Schema :: connection in a normal way, but the problem is that I also have some TRIGGERS and PROCEDURES as migrations using the...
asked by 12.11.2018 / 20:53
0
answers

Save user id of web application in MySQL audit table

I have the following TRIGGER which inserts certain specific data for the purpose of auditing. I need that in the field Audit user the id of the user who started the session in the system and not the one in the database is saved. DELIMITER //...
asked by 26.11.2018 / 01:31
1
answer

Create a trigger that does not allow editing a record that has been referenced

I need help with a slogan of a job that I have been given at the university to study, and I have been trying to solve it but I can not think of how .. I am starting in SQL Server. These are the tables of the statement : The statement say...
asked by 03.11.2018 / 23:29
0
answers

Trigger Record Update Date

Good bye? I would need to create a trigger that before a modification of some field of my user table, I enter the current date of modification, if you could help me I would be very grateful.     
asked by 04.11.2018 / 23:01
0
answers

SQL Trigger in Stroed procedure - activate trigger after using sp

Suppose I have a very simple stored procedure , which performs a select , but I want to make a trigger that is activated every time I use that stored procedure . Does anyone know exactly how to do something like that?...
asked by 27.10.2018 / 01:40
0
answers

linked server and transactions SQL server to MYSQl

Good morning, the issue is like this, I have two databases sql server and mysql, every time an insert is made (this side of sql server) in a table, these changes must also affect the table in mysql , I have a linked server, I decided to make a t...
asked by 23.10.2018 / 18:02
1
answer

create trigger to change a field

I have a table that I use to send an advertisement to clients, in this table I have a field called email, I need a trigger to make the change after a customer record is inserted, to verify that this field in particular that is email, if eta null...
asked by 03.11.2018 / 01:11