开发者

Selecting all but one field?

开发者 https://www.devze.com 2023-01-03 00:15 出处:网络
instead of SELECT * FROM mytable, i would like to select all fields EXCEPT one (namely, the \'serialized\' field, which stores a serialized object). this is because i think that los开发者_如何学JAVAin

instead of SELECT * FROM mytable, i would like to select all fields EXCEPT one (namely, the 'serialized' field, which stores a serialized object). this is because i think that los开发者_如何学JAVAing that field will speed up my query by a lot. however, i have so many fields and am quite the lazy guy. is there a way to say...

`SELECT ALL_ROWS_EXCEPT(serialized) FROM mytable`

?

thanks!


No, there is no convention in SQL to get all but one (or a number of designated) column(s).

Being explicit about what column(s) are being returned, preferably using a table alias (even if only for one table), is ideal.

0

精彩评论

暂无评论...
验证码 换一张
取 消