9

It is possible to substitute a statement like this

select column1,column2,column3

with something like

select like 'column_'

in a Postgresql query?

6
  • 1
    Not using regular SQL. Commented Dec 20, 2017 at 12:19
  • 4
    It can be done using dynamic SQL. But why? Seems like an odd design decision to depend on column names. Commented Dec 20, 2017 at 12:30
  • was answered on SO I believe Commented Dec 20, 2017 at 12:58
  • Possible duplicate of Postgres Dynamic Query Function Commented Dec 20, 2017 at 12:58
  • 1
    It was only a curiosity. Today it's my first day in sql. Thanx Commented Dec 20, 2017 at 12:59

1 Answer 1

1

No, you cannot use LIKE in the SELECT part of the query.

Wildcards can only be used in the WHERE part of the query.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.