문제

i am running this query (mysql workbench) which works perfectly.

select * from message where date between '2001-09-09 00:00:00' and '2001-09-10 00:00:00'

the results of this query are a number of various columns, of which i am only interested in one named 'body'.

How do i go about exporting only the 'body' column that has resulted from the above query?

Thanks!!

도움이 되었습니까?

해결책

Just include the column(s) you want after select instead of using * ("all"):

select body from message where date between '2001-09-09 00:00:00' and '2001-09-10 00:00:00'

The column(s) you select and the column(s) by which you filter can be two entirely different sets of columns.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top