# Database Discussions > MySQL >  If Else condition

## Lexxzy

Hi all,

Does anyone have an ideas on how to use if else condition in creating and altering tables which is not inside the create procedure or function scripts?
For example:
If not exists() then
   create table scripts();
else
   alter table.....



thanks.

----------


## Civic1986

if exists( condition )
begin
          /// if condition is true then statements to be executed..
end
else
begin
          /// if condition is false then statements to be executed..
end

----------

