Advertisement
Guest User

Locations table/data

a guest
Jul 22nd, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.63 KB | None | 0 0
  1. /**
  2.  * Locations table
  3.  */
  4. CREATE TABLE `locations` (
  5.     `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  6.     `name` VARCHAR(15) NOT NULL,
  7.     `latitude` DECIMAL NOT NULL,
  8.     `longitude` DECIMAL NOT NULL,
  9.     `user_id` INT NOT NULL,
  10.     `created` DATETIME DEFAULT NULL,
  11.     `modified` DATETIME DEFAULT NULL
  12. );
  13.  
  14. /**
  15.  * Locations data
  16.  */
  17. INSERT INTO `locations` (`id`, `name`, `latitude`, `longitude`, `user_id`, `created`, `modified`) VALUES
  18.     (0, 'Boston, MA', 42.3581, 71.0636, 3, NOW(), NOW()),
  19.     (0, 'London, England', 51.5072, 0.1275, 3, NOW(), NOW()),
  20.     (0, 'Great Barrier Reef', 18.2861, 147.7000, 3, NOW(), NOW());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement