Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> LOAD DATA LOCAL INFILE 'app/database/resources/postcodes-geocodes.csv' IGNORE INTO TABLE postcodes FIELDS TERMINA
- TED BY ',' LINES TERMINATED BY '\r\n';
- Query OK, 0 rows affected, 1 warning (0.79 sec)
- Records: 1 Deleted: 0 Skipped: 1 Warnings: 1
- mysql> show create table postcodes;
- +-----------+-----------------------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------------------------------------
- ---------------------------------------------------------------------------+
- | Table | Create Table
- |
- +-----------+-----------------------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------------------------------------
- ---------------------------------------------------------------------------+
- | postcodes | CREATE TABLE `postcodes` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `postcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `lat` decimal(32,30) NOT NULL,
- `lng` decimal(32,30) NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
- +-----------+-----------------------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------------------------------------
- ---------------------------------------------------------------------------+
- 1 row in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement