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?

Samantha Catania
  • 5,116
  • 5
  • 39
  • 69

1 Answers1

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;
Samantha Catania
  • 5,116
  • 5
  • 39
  • 69