tag:blogger.com,1999:blog-5849265.post113231530747217371..comments2023-10-29T20:45:15.971+05:30Comments on Vadivel's blog: Quick search within ALL stored procedures ...Vadivelhttp://www.blogger.com/profile/13387133927257826888noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-5849265.post-1168040787754474592007-01-06T05:16:00.000+05:302007-01-06T05:16:00.000+05:30Thank you very much for the stored procedure. I ha...Thank you very much for the stored procedure. I have included it in my utilities chest!<BR/><BR/>I used following code to search for all tables that contain a column:<BR/><BR/>Select o.name, suser_sname(o.uid), c.name<BR/>From sysobjects o inner join syscolumns c<BR/>on o.id = c.id<BR/>where o.type = 'U' -- U for user table - see sysobjects table in bol for more object types<BR/>and c.name like 'Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5849265.post-1132890985402151542005-11-25T09:26:00.000+05:302005-11-25T09:26:00.000+05:30>>Are you searching the name of the SP or the cont...>>Are you searching the name of the SP or the content in the SP<BR/><BR/>I am searching within the content of the all SP's. I would suggest you to try the code snippet to have a better understanding of it.Vadivelhttps://www.blogger.com/profile/13387133927257826888noreply@blogger.comtag:blogger.com,1999:blog-5849265.post-1132890887351151512005-11-25T09:24:00.000+05:302005-11-25T09:24:00.000+05:30>>whats the difference between the SP's created in...>>whats the difference between the SP's created in Master DB & Other DB?<BR/><BR/>I guess your question is about why we shouldn't use "SP_" for stored procs which are created in DB other than MASTER. Its like this:<BR/><BR/><I>As you might be knowing the system stored procs would be prefixed with "SP_". That said, if we prefix "sp_" in our user-defined stored procedure it would bring down the Vadivelhttps://www.blogger.com/profile/13387133927257826888noreply@blogger.comtag:blogger.com,1999:blog-5849265.post-1132830873844002722005-11-24T16:44:00.000+05:302005-11-24T16:44:00.000+05:30whats the difference between the SP's created in M...whats the difference between the SP's created in Master DB & Other DB?Are you searching the name of the SP or the content in the SP?can you clarify this?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5849265.post-1132317523865792702005-11-18T18:08:00.000+05:302005-11-18T18:08:00.000+05:30Really an useful post.Really an useful post.Anonymousnoreply@blogger.com