Thus, it is not possible to use SELECT *
and replace one of the columns with another value.
If you do not want to use the select statement specified in the application code, you can create a view with the fields filled in and the identifier will be deleted. You still have to specify all columns at least once.
select NULL as ID, t.col2, t.col3, t.col4 from mytable t where col2 = 1
Here is an easy way to get all column names:
SELECT column_name FROM information_schema.columns WHERE table_name = mytable
Vinnie
source share