D:\>copy con: select1.sql set showplan_text on go if exists (select 1 from sysobjects where xtype = 'U' and name = 'jobs') print 'exists' else print 'doesn''t exist' ^Z 1 file(s) copied. D:\>copy con: selectstar.sql set showplan_text on go if exists (select * from sysobjects where xtype = 'U' and name = 'jobs') print 'exists' else print 'doesn''t exist' ^Z 1 file(s) copied. D:\>osql -dpubs -n -i selectstar.sql > selectstar.txt D:\>osql -dpubs -n -i select1.sql > select1.txt D:\>diff select1.txt selectstar.txt 3c3 < if exists (select 1 from sysobjects where xtype = 'U' and name = 'jobs') --- > if exists (select * from sysobjects where xtype = 'U' and name = 'jobs')