Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking for a tool that would help me easily reuse queries.

What should it be like?

You type a query like Select * FROM person where name LIKE ${name}
And you would like to re-use this type of query next time like invocation of some function with parameter/s like personWithNameLike(P) or personWithNameLike(name=p}

Is there any tool that could help me in any way?

share|improve this question
    
"And U would like reuse" - Pleeease use complete words and somewhat correct grammar. –  Nifle Jul 13 '11 at 9:51
    
What type of database are you using? (MySql, Postgres, etc.) –  Bryan Agee Jul 13 '11 at 16:06

1 Answer 1

up vote 0 down vote accepted

Read about how to setup stored procedures for your version of SQL (if supported).

A stored procedure lets you define what should be done (eg: a query), the expected input and output and then you can 'call' the procedure just as you describe.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.