SQLite build table to import MySQL

Source: Internet
Author: User

New SQLite

[Email protected] msqlite]$ sqlite3 contact.db
SQLite version 3.6.20
Enter '. Help ' for instructions
Enter SQL statements terminated with a ";"

CREATE table contact (ID integer auto_increment, name varchar (+) not NULL, mobile varchar (2), address varchar (+), email varchar (+), QQ varchar (20));

Sqlite> INSERT into the contact values (1, ' Fang ', ' 1999999 ', ' Huaqian ', ' [email protected] ', ' 2250980621 ');
New Document
[Email protected] msqlite]$ Vim Data.txt
Add content in the same format as insert INTO
For example
2|lang|5445999| hbnghian| [Email protected]|121250980621
3|forng|87599|yhgaqian| [Email protected]|2250980621
4|dewng|1987985|jkhjgf| [Email protected]|2250980621
5|lang|5445999| hbnghian| [Email protected]|121250980621
6|forng|87599|yhgaqian| [Email protected]|2250980621
7|dewng|1987985|jkhjgf| [Email protected]|2250980621

Import
. import./data.txt Contact
sqlite>. Output Cc.sql
sqlite>. Dump Contact
sqlite> Select *from Contact;
sqlite>. Output stdout
sqlite> drop table contact;

Sqlite> Select *from Contact
ysql> drop Database contact;
Mysql> source./cc.sql;
All right! Complete!

SQLite build table to import MySQL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.