0

I want to show column expect column number 1 for example = select * from table; this query will show all column

column1 column2 column3 ...

but my question is how to show all column expect column1, so the result will be like this column2 column3 ...

I don't want to use select column2, column3 from table because that query not efective if my column more than 3. thank

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
Tri Bagus
  • 67
  • 1
  • 8
  • Possible duplicate of [select first N columns of MySQL table](https://stackoverflow.com/questions/17258970/select-first-n-columns-of-mysql-table) – Bagus Tesa May 31 '18 at 07:54
  • 5
    Possible duplicate of [SQL exclude a column using SELECT \* \[except columnA\] FROM tableA?](https://stackoverflow.com/questions/729197/sql-exclude-a-column-using-select-except-columna-from-tablea) – tttapa May 31 '18 at 07:54

1 Answers1

-1

You can select the column after SELECT:

SELECT * FROM table

* means ALL columns, so:

SELECT columnName, columName2 FROM table
Pang
  • 9,564
  • 146
  • 81
  • 122
Obeid
  • 49
  • 1
  • 1
  • 5
  • That does not help to select **all** columns but one, unless you list all of them by hand, which the OP does not want to do – Nico Haase Feb 26 '21 at 11:22