create table #tb(a bit,b bit,c bit) insert into #tb exec master..xp_fileexist 'c:\boot.ini ' --c:\boot.ini是要检查的文件名 if exists(select * from #tb where a=1) print '有该文件 ' else print '无该文件 ' drop table #tb 相关文章: 2022-12-23 2021-07-26 2021-10-04 2021-08-16 2021-08-30 2022-12-23 2022-12-23 2022-12-23