Skip to content

Instantly share code, notes, and snippets.

@lithix-src
Created January 30, 2013 21:47
select count(*)
into @exists
from information_schema.tables
where table_schema = 'dbs_admin'
and table_name = 'dbs_auto_increment';
set @qry = if(@exists<0,
'rename table publisher.dbs_auto_increment to dbs_admin.dbs_auto_increment',
'select \'table exists\' status');
prepare stmt from @qry;
execute stmt;
drop @exists;
drop @qry;
drop stm;
@splee
Copy link

splee commented Jan 30, 2013

Missing a 't' on "drop stmt;"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment