Fury
Fury

Reputation: 161

Datatype for latitude & longitude in mysql 8.0

I want to use google maps in my project and for that i need to store lat/lng values in database .So what will be the datatype for lat/lng in MySQL? should it be decimal or spatial (geometry,geometryColllection or point or any other)?

PS: lat will be separate field and lng will be separate field.

Please help me find the solution.

Thanks in Advance.

Upvotes: 1

Views: 257

Answers (1)

Yogesh Patil
Yogesh Patil

Reputation: 51

DECIMAL(10,8) for latitude DECIMAL(11,8) for longitude

Upvotes: 1

Related Questions