generally when i make a small select I would do something like this
SELECT id,DATE_FORMAT(updated,'%M %e, %Y %l:%i %p'),title from ta开发者_如何学JAVAblename;
and that would give me a date format that I like.
Now I have an instance where I have a select where I don't want to specify every column because I know I want them all. However I also need to format dates the way i did in the previous example.
is there a way to format say just the updated column and all other feilds and still keep there order ?
i tried this
SELECT *,DATE_FORMAT(updated,'%M %e, %Y %l:%i %p') as updated from tablename
but that doesn't seem to be doing anyhting
I did not tested but you could try with this
SELECT t.*,DATE_FORMAT(updated,'%M %e, %Y %l:%i %p')
as updated from tablename as t;
精彩评论