Sunday, February 19, 2012

Can a stored procedures result set be returned

Pls give some samplesOriginally posted by bennydubai
Pls give some samples

create procedure theExample as
select * from sysobjects|||Got it!!! Thanks............getting the column count in tables.

select sysobjects.name,count(*) from sysobjects
join syscolumns on syscolumns.id=sysobjects.id
where sysobjects.xtype='u'
group by sysobjects.name|||OR BETTER THIS WAY

SELECT
count(*)
FROM INFORMATION_SCHEMA.COLUMNS
where table_name='staff'

No comments:

Post a Comment