It is my Computer Notes. Using Guide : object-key or object-key-key e.g. Step 1 Blog Search : [mysql-run] and then Step 2 ctrl+F [mysql-run] {bookMark me : Ctrl+D}
2013年10月1日 星期二
mysql-procedure generateTaxDoc
mysql-routine generateTaxDoc
delimiter $$
drop procedure generateTaxDoc $$
CREATE PROCEDURE generateTaxDoc (
P_taxDoc varchar(10), P_employeeRecordid int(20),P_employeeNumber int(20))
BEGIN
declare mycount int(4);
select count(*) into mycount from taxDoc where taxdoc=P_taxdoc and employeeRecordid=P_employeeRecordid;
if (mycount=0) then
insert into taxDoc (taxdoc,employeeRecordID) values (P_taxdoc,P_employeeRecordid);
end if;
END;
$$
call generateTaxDoc(1,2,3) $$
select * from taxDoc $$
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言