Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how can i specify the column i don't want to display?

I want to show all the remaining data in the table except some columns. However, despite doing a lot of research, I get stuck in many places. What is the logic of this?

SELECT * ,c.phone AS telefon FROM accounts c;

Table:

user_id  phone    teléfono
    1    null     99999999

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can’t do that. Instead, you specify the columns that you do want.

SELECT column_a, column_b, column_x FROM table;

It is a good idea in query to really only specify the columns that you really need. Otherwise you are in for surprises if the table schema might change in the future.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading