Hi there
When query mongo like
select * from mongo.test.`zips` limit 20
it return ,
+------------+
| * |
+------------+
| { "city" : "AGAWAM" , "loc" : [ -72.622739 , 42.070206] , "pop" : 15338.0
, "state" : "MA"} |
| { "city" : "BARRE" , "loc" : [ -72.108354 , 42.409698] , "pop" : 4546.0 ,
"state" : "MA"} |
| { "city" : "BELCHERTOWN" , "loc" : [ -72.410953 , 42.275103] , "pop" :
10579.0 , "state" : "MA"} |
| { "city" : "BLANDFORD" , "loc" : [ -72.936114 , 42.182949] , "pop" :
1240.0 , "state" : "MA"} |
| { "city" : "BRIMFIELD" , "loc" : [ -72.188455 , 42.116543] , "pop" :
3706.0 , "state" : "MA"} |
| { "city" : "CHESTER" , "loc" : [ -72.988761 , 42.279421] , "pop" : 1688.0
, "state" : "MA"} |
| { "city" : "CHESTERFIELD" , "loc" : [ -72.833309 , 42.38167] , "pop" :
177.0 , "state" : "MA"} |
| { "city" : "CHICOPEE" , "loc" : [ -72.607962 , 42.162046] , "pop" :
23396.0 , "state" : "MA"} |
| { "city" : "CHICOPEE" , "loc" : [ -72.576142 , 42.176443] , "pop" :
31495.0 , "state" : "MA"} |
| { "city" : "WESTOVER AFB" , "loc" : [ -72.558657 , 42.196672] , "pop" :
1764.0 , "state" : "MA"} |
+------------+
Is there any way that it can return all the fields but not " * " ?
like this
| city | loc | pop | state |
+------------+------------+------------+------------+
| AGAWAM | [-72.622739,42.070206] | 15338.0 | MA |
| BARRE | [-72.108354,42.409698] | 4546.0 | MA |
| BELCHERTOWN | [-72.410953,42.275103] | 10579.0 | MA |
or Can I query all the field in the collection first ?
Thanks you all in advanced.