Skip to content

Commit 7e8a096

Browse files
authored
Create decimal-data-type.sql
1 parent 096c756 commit 7e8a096

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- Create example table
2+
CREATE TABLE coordinates (
3+
id INT AUTO_INCREMENT PRIMARY KEY,
4+
location VARCHAR(255),
5+
latitude DECIMAL(10, 8) NOT NULL,
6+
longitude DECIMAL(11, 8) NOT NULL
7+
);
8+
-- Add example data
9+
INSERT INTO coordinates (location, latitude, longitude)
10+
VALUES ('Eiffel Tower', 48.8584, 2.2945);
11+
-- Query example data
12+
SELECT * FROM coordinates;

0 commit comments

Comments
 (0)