Quote:
|
Originally Posted by vivek.vivek
Please help to find the mistake in this:
if(select count(*) from sysibm.systables where type='T' and name='VIVEK'=1)
begin
alter table dbo.vivek drop column hai
end
|
I am not sure what you are trying to do, but looks like part
select count(*) from sysibm.systables where type='T' and name='VIVEK'
is missing schema name - there could be more than 1 table with the same name and different schemas. Your query might find tables with different than 'dbo' schema and assumes that tables 'dbo.vivek' exists which is not correct.