标签:
哈哈,先测试下博客
存储过程:查找指定用户名,如果未查到则插入新用户,否则。。。(毫无意义纯粹测试)
create procedure test8(in para varchar(60))
begin
declare userid bigint;
set userid = 0;
select ID into userid from wp_users where user_login =para;
if userid = 0 then
insert into wp_users values(null,para,md5(para),para,‘‘,‘‘,now(),‘‘,0,para);
else
select * from wp_users;
end if;
end;
set @para =‘dfskgd‘;
call test8(@para);
标签:
原文地址:http://www.cnblogs.com/yingyi/p/4234286.html