# Related Sites > SQL Course >  How to count no of lines in stored procedure

## pis_madhu

Hi,

   how can I get the no of lines in my stored procedure. 

    sp_helptext procname returen procedure text if we can store this content in table we get the count from that table.

Please help me, how can I do this.

Thank you 

- Madhu

----------


## rmiao

Query analyzer tells you that.

----------


## ovijay

Hi Madhu,

I think u can use the following query to find the line count from procedure.

SELECT COUNT(1) FROM USER_SOURCE
WHERE
NAME='&object_name'

----------


## rmiao

What's USER_SOURCE? Is it for sql server?

----------

