Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    Dubai
    Posts
    29

    Smile Unanswered: Can a stored procedure's result set be returned

    Pls give some samples

  2. #2
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401

    Yes

    Originally posted by bennydubai
    Pls give some samples
    create procedure theExample as
    select * from sysobjects
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  3. #3
    Join Date
    Mar 2004
    Location
    Dubai
    Posts
    29

    Thumbs up

    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
    Last edited by bennydubai; 04-04-04 at 08:25.

  4. #4
    Join Date
    Mar 2004
    Location
    Dubai
    Posts
    29

    Thumbs up

    OR BETTER THIS WAY

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •