What are MySQL triggers and how to use them?

|
Grv 2022-06-14 11:05:57
tanya 2022-06-14 10:48:54
Where is the error

Check table/view name

tanya 2022-06-14 11:12:27
mysql_en-21723.jpg

tanya 2022-06-14 11:12:42
tanya 2022-06-14 11:12:27

Here i created the procedure

Jitendra bansal 2022-06-14 11:35:49
How we autogenerated key like deptoo1 and so on pls any one tell me
Vikash Raj 2022-06-14 11:36:34
mysql_en-21726.jpg

Vikash Raj 2022-06-14 11:36:35
mysql_en-21727.jpg

Jitendra bansal 2022-06-14 11:37:35
Vikash Raj 2022-06-14 11:36:35

Kesa bhai

Jitendra bansal 2022-06-14 11:37:45
Ya to no sa start ho reha hai
tanya 2022-06-14 11:42:29
Trigger create to insert go to table anyone knows
2022-06-14 13:14:12
ERROR 1366 (22007): Incorrect string value: ‘xF0x9Dx99x87xF0x9D…’ for column

Tried to change characterset of table and column

Jitendra bansal 2022-06-14 14:11:49
tanya 2022-06-14 11:42:29
Trigger create to insert go to table anyone knows

Yes

Swapnil 2022-06-14 16:29:33
Jitendra bansal 2022-06-14 11:35:49
How we autogenerated key like deptoo1 and so on pls any one tell me

This does not make any sense

Swapnil 2022-06-14 16:29:45
primary key is used to uniquely identify records
If deptoo is going to be same throughout then it makes no sense to have the column in such manner
Swapnil 2022-06-14 16:30:05
if you want it for display purpose then create a view and inside view use concat
Joanna 2022-06-14 19:00:41
Hello everyone! We’re hosting a Hackathon with great prizes to be won! Sign up with your friends and show off your programming skills 🤓 Databases are the main subject of the competition!
https://bit.ly/3O2LeoG
Jitendra bansal 2022-06-14 19:07:50
Swapnil 2022-06-14 16:30:05
if you want it for display purpose then create a view and inside view use concat

Could u give example of that

Swapnil 2022-06-14 19:40:21
Jitendra bansal 2022-06-14 19:07:50
Could u give example of that

CREATE VIEW AS
Select ‘deptoo’ || primarykey_columnname
from tablename

OR you can directly use the select query as below

Select ‘deptoo’ || primarykey_columnname
from tablename

Jitendra bansal 2022-06-14 19:42:58
Swapnil 2022-06-14 19:40:21
CREATE VIEW AS
Select ‘deptoo’ || primarykey_columnname
from tablename

OR you can directly use the select query as below

Select ‘deptoo’ || primarykey_columnname
from tablename

I will try this thanks for tell me

Jitendra bansal 2022-06-14 19:43:19
‘thisis a string ‘ na
Swapnil 2022-06-14 19:43:42
Jitendra bansal 2022-06-14 19:43:19
‘thisis a string ‘ na

Yes

Jitendra bansal 2022-06-14 19:59:41
Swapnil 2022-06-14 19:40:21
CREATE VIEW AS
Select ‘deptoo’ || primarykey_columnname
from tablename

OR you can directly use the select query as below

Select ‘deptoo’ || primarykey_columnname
from tablename

Not work

Swapnil 2022-06-14 20:00:47
Jitendra bansal 2022-06-14 19:59:41
Not work

Create view name_of_view as
Select ‘deptoo’ || primarykey_columnname
from tablenam

Sha 2022-06-14 20:01:30
hi all, i recently got a requirement in my project where i needed to create few entities(I am a non db resource). Lets say i have 3 entities. and i have a resultant entity which is obtained after joining these three entities. can anyone let me know how can the resultant db be updated if any of these three entities are to be updated?
Swapnil 2022-06-14 20:02:39
Sha 2022-06-14 20:01:30
hi all, i recently got a requirement in my project where i needed to create few entities(I am a non db resource). Lets say i have 3 entities. and i have a resultant entity which is obtained after joining these three entities. can anyone let me know how can the resultant db be updated if any of these three entities are to be updated?

Give some more details

Sha 2022-06-14 20:05:29
well i can explain with an example. lets say i have 3 tables, A,B,C . i have prepared the resultant table (say D) by performing inner joins on A,B,C. Now, I have a scenario where my table A has got updated when a new row is inserted. What can be done so that this changes are also reflected in table D.
Swapnil 2022-06-14 20:46:22
Sha 2022-06-14 20:05:29
well i can explain with an example. lets say i have 3 tables, A,B,C . i have prepared the resultant table (say D) by performing inner joins on A,B,C. Now, I have a scenario where my table A has got updated when a new row is inserted. What can be done so that this changes are also reflected in table D.

You have to make use of trigger in that case to update table D
https://www.siteground.com/kb/mysql-triggers-use/#:~:text=A%20MySQL%20trigger%20is%20a,before%20or%20after%20the%20event.

What are MySQL triggers and how to use them?SiteGround Knowledge Resources
A MySQL trigger is a database object that is associated with a table. It will be activated when a defined action is executed for the table. The trigger can
DBA 2022-06-15 12:55:09
Can we kill all sleep user
DBA 2022-06-15 12:55:49
Is there any impact on database consistency if I kill sleep users?
myid_3008 2022-06-15 14:14:32
Hi anyone has MySQL notes or video cource
svart 2022-06-15 14:37:12
DBA 2022-06-15 12:55:49
Is there any impact on database consistency if I kill sleep users?

Feel free

svart 2022-06-15 14:37:32
myid_3008 2022-06-15 14:14:32
Hi anyone has MySQL notes or video cource

YouTube has a lot

DBA 2022-06-15 15:54:35
svart 2022-06-15 14:37:12
Feel free

Means?

MasterZiv 2022-06-15 18:20:55
Hello everyone. I am an amateur with MySQL workbench. I had this error trying to import a dataset.
Could someone help me? I don’t really know how to do it…
MasterZiv 2022-06-15 18:20:56
mysql_en-21779.jpg

dj2021dj 2022-06-15 18:21:09
Sachin Kansal 2022-06-13 17:10:56
You can insert multiple data in multiple tables simultaneously

Hi everyone, I upload data using Excel file by mistake I removed na letters we added space,

Now we want replace with na again

Can any one mysql command for it

|