Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT campo1, campo2, campo3/campo4 AS nomeQueQuiserDar FROM tabela
- CREATE VIEW nome_view AS
- SELECT campo1, campo2, campo3/campo4 AS divisao FROM tabela;
- SELECT campo1, campo2, divisao FROM nome_view
- CREATE TRIGGER nome_trigger AFTER INSERT
- ON tabela
- FOR EACH ROW UPDATE tabela SET NEW.campo3 = NEW.campo1 / NEW.campo2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement