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
SQL transaction
Finde einmalige Datensätze im Vergleich mehrerer Tabellen
Create Procedure For Getting Grades Through Student Id and Marks
Teste
Adding a number
13 de Abril del 2018
MySQL Practice
Get second least column in a row in mysql
Práctica MySQL 1
ITM_14210069