Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

select multiple columns in PostgreSQL using wildcard characters

Tags:

sql

postgresql

It is possible to substitute a statement like this

select column1,column2,column3

with something like

select like 'column_'

in a Postgresql query?

like image 256
ilFonta Avatar asked Dec 20 '17 12:12

ilFonta


People also ask

How to use wildcards in PostgreSQL?

Step 1) Type the following query in the query editor: Step 2) Click the Execute button. It should return the following: The PostgreSQL LIKE is used in matching text values against patterns using wildcards. The LIKE clause allows us to use wildcards in SELECT, UPDATE, INSERT, or DELETE statements. The % wildcard matches one or more values.

How do you use a wildcard character in a query?

Using the wildcard character to select all columns in a query. Selecting with more than 1 condition. SQL SELECT Using the wildcard character to select all columns in a query. Consider a database with the following two tables. * is the wildcard character used to select all available columns in a table.

Which character is used to select all available columns in SQL?

SQL SELECT Using the wildcard character to select all columns in a query. Consider a database with the following two tables. * is the wildcard character used to select all available columns in a table.

How to use wildcards in where clause in SQL?

It is possible to match the search expression to the pattern expression. If a match occurs, the LIKE operator returns true. With the help of LIKE operator, it is possible to use wildcards in the WHERE clause of SELECT, UPDATE, INSERT or DELETE statements.


1 Answers

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

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

like image 195
Rui Costa Avatar answered Sep 23 '22 02:09

Rui Costa