Merge branch 'release-2.140.115'
[feisty_meow.git] / production / example_apps / zippy_maps / docs / mysql_scratch_sheet_looking_at_tables_v001.sql
diff --git a/production/example_apps/zippy_maps/docs/mysql_scratch_sheet_looking_at_tables_v001.sql b/production/example_apps/zippy_maps/docs/mysql_scratch_sheet_looking_at_tables_v001.sql
new file mode 100644 (file)
index 0000000..e4cad48
--- /dev/null
@@ -0,0 +1,18 @@
+show databases;
+#create database zipcodes;
+use zipcodes;
+
+describe categories;
+
+select * from categories where image is null;
+
+describe locations;
+
+select * from locations where id > 3000;
+
+# useful floating point compare technique.
+select * from locations where abs(lat - '18.17') <= 1e-6;
+
+select * from locations where id = 607;
+
+select * from locations ;