开发者

Selecting all but one field?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜