3

Most GUI SQL Consoles allow the use of parameters/placeholders as follows

SELECT * FROM USERS WHERE USER_NAME = :USER_NAME;

You are usually (e.g. Toad, IntelliJ, etc.) presented with a dialog where you have to enter a value for each parameter. However, in PGAdmin I get a syntax error. Is this not supported in PGAdmin or do they use a different syntax?

1 Answer 1

1

PGAdmin does not seem to support bind variables; but I found a work around on another : question

WITH VARS AS (SELECT 'Name.Surname'::VARCHAR AS USER_NAME)
SELECT * FROM USERS, VARS WHERE USER_NAME = VARS.USER_NAME;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.