Finding number of columns returned by a query.

vishalneeraj-24503
Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 698
1st way: -
select top 0 *
into temp_table
from employee_master;


2nd way:-
select count(*) as 'No of Columns'
from Information_Schema.Columns c
where table_name = 'temp_table'

Comments or Responses

Login to post response