Results 1 to 2 of 2

Thread: If Else condition

  1. #1
    Join Date
    Jan 2008
    Posts
    3

    If Else condition

    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.

  2. #2
    Join Date
    Feb 2011
    Posts
    7
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •