What is trigger in mysql with example?
Answer / Vivekanand Ojha
In MySQL, a trigger is a stored procedure that is automatically executed when an event occurs on a specific table. For example, you could create a trigger to insert data into a log table every time a row is inserted into another table.nCREATE TRIGGER ins_log AFTER INSERT ON mytable FOR EACH ROW INSERT INTO mylog VALUES (NEW.id, NEW.column1, NEW.column2);
| Is This Answer Correct ? | 0 Yes | 0 No |
How to see the create table statement of an existing table?
Where is mysql data stored?
How do I start mysql in linux?
What is username in mysql?
How can I insert images into a Mysql database?
How can you import tables from a sql file into a database by using the mysql client?
How can you change the password of a mysql user?
How would you backup and restore a big MySQL database? What are the advantages of the approach which you have taken over the others?
Is mysql port 3306 tcp or udp?
What is mysql in linux?
What is diff b/w MYISAM and INNODB storage engine. and also define the benifits and drawbacks of both storage engine
Can varchar be primary key?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)