Hi,<div><br></div><div>I have two tables, one which define lines (ST_LineString) and a point (St_Points).</div><div><br></div><div>I'm searching to get the nearest line from this point.</div><div><br></div><div>My first solution was to use this type of query :</div>
<div>SELECT</div><div>   id,</div><div>   St_Distance(line, myPoint) d</div><div>FROM</div><div>   my_lines_tables</div><div>ORDER BY d ASC LIMIT 1</div><div><br></div><div>But it's very long. Is there is another way to make this ?</div>
<div><br></div><div>Thank you all,</div><div>Kin</div>