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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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


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.