if exists (select * FROM sys.sysobjects where id = object_id(N'dbo.ConnectionWiki'))
begin
    if not exists (select * FROM sys.sysobjects where id = object_id(N'dbo.ConnectionHandbook'))
	    exec sp_rename N'dbo.ConnectionWiki', N'ConnectionHandbook'; 
    else
	    drop table dbo.ConnectionWiki; 
end