Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
prova
#MySQL 5.7.12 #please drop objects you've created at the end of the script #or check for their existance before creating #'\\' is a delimiter select version() as 'mysql version' CREATE OR REPLACE PROCEDURE InsereEmpregado (v_codigo in tb_empregado.codigo%type, v_nome in tb_empregado.nome%type, v_sal in tb_empregado.salario%type, v_comissao in tb_empregado.pct_comissao%type, v_est in tb_empregado.est_nasc%type) IS BEGIN IF v_sal > 1000 THEN INSERT INTO TB_EMPREGADO (CODIGO, NOME, DT_ADMISSAO, SALARIO, PCT_COMISSAO, EST_NASC) VALUES (v_codigo, v_nome, SYSDATE, v_sal, 0, v_est); ELSE INSERT INTO TB_EMPREGADO (CODIGO, NOME, DT_ADMISSAO, SALARIO, PCT_COMISSAO, EST_NASC) VALUES (v_codigo, v_nome, SYSDATE, v_sal, v_comissao, v_est); END IF; commit; END InsereEmpregado;
run
|
edit
|
history
|
help
0
Finde einmalige Datensätze im Vergleich mehrerer Tabellen
my sql
Adding a number
MySQL subtract 8 hours
lab01
Conditional SQL select
CS
poi
Mysql join same table where not in
grre