Posts by MFD • 81 points
4 posts
-
0
votes3
answers12463
viewsQ: How to select last Mysql table record with last or another command?
How to select last record from Mysql table with last or another command For example: select last registro from tabela where coluna = 23; I tried with this code but it didn’t work.…
mysql-workbenchasked MFD 81 -
3
votes1
answer837
viewsQ: How to add multiple rows of two tables in Mysql
I’ve tried this code, but it only adds up to one line, if you modify the where, error or wrong sum, need to add each separate line. I need to add these two fields with several lines. km_h_tp is the…
-
3
votes1
answer5696
viewsA: Adding a foreign key to mysql
try this code, works well on Workbench alter table cerveja add foreign key(codigo_estilo) references estilo(codigo);
-
1
votes0
answers35
viewsQ: How to resolve this Trigger in Mysql?
create trigger tr_kmanterior before insert on t_consumos for each row set new.kmanterior_c = (preview.kmatual_c); OR create trigger tr_kmanterior before insert on t_consumos for each row set…