title: MySQL: create function that returns an array
body: <p>CREATE Function getNearIds (myLocationLon double, myLocationLat double) RETURNS <strong>WHAT</strong></p>
  
  <p>I just want to return an array of integers, after a long search: some say use Group_concat to make the list as a comma separated list then use find_in_set when calling the function. this works ok but in HQL (Hibernate query language) it doesn't.</p>
  
  <p>so I need a clear way for this function to return an array of integers, what if i want to return a list of items from items table, is this possible.</p>
  
  <p>I think this is very simple to do in Oracle DB or even SQL server. why is it very tough in MySQL.</p>
  
  <p>please help.</p>