首页 > 解决方案 > 创建了一个合并两个表 branch_mstr 和 new_branches 的过程(只有两个字段和相同的主键)

问题描述

delimiter $$
create procedure mergeData()
begin
    declare counter, rowws int default 0;
    set rowws = (select count(*) from new_branches);
    begin
        while counter < rowws do
            if new_branches.branch_no != branch_mstr.branch_no then
            insert into branch_mstr value(new_branches.branch_no, new_branches.name);
        end while;
        end;
end$$
delimiter ;

为什么显示这些十字架,我正在使用 MySQL 并且是 PL/SQL 的新手。寻求帮助

标签: mysqlstored-proceduresdatatablesmerging-data

解决方案


推荐阅读