Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I saw few sql queries with ### appended before and after column name in where clause like

                   `select a from emp where a.###id### = 1`

What is significance of these hashes?

share|improve this question
1  
What is your RDBMS? –  A-K Apr 9 '13 at 18:19
    
Where, specifically, did you find these hashes? In a file? In a stored proc? Looks like MySQL based on the backticks, but idk –  jcolebrand Apr 9 '13 at 18:30

1 Answer 1

Looks to me like the Dev was implementing some sort of parameterization in the predicate; specifically, allowing for the same basic query to be fired against different fields.

Somewhere later, there should be some sort of string replace to turn the hashes into a field name.

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.