Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL SELECT * FROM tbl (HIDE 1 COLUMN)

I'm trying to do SELECT * FROM tbl, but out of 20 columns I don't want 1 particular column to be selected. Is there a dynamic way to do so? Just hate to specify 19 columns in the query!

like image 627
eistrati Avatar asked Dec 16 '22 12:12

eistrati


1 Answers

Just specify the columns. You should be doing that all the time anyway as select * is a very poor programming choice. I don't know about mysql but in SQL Server I can drag all the columns over from the object browser and delete the ones I don't want, it takes seconds. Perhaps the interface you use has a similar functionality.

like image 96
HLGEM Avatar answered Dec 19 '22 07:12

HLGEM