Mysql table converted to SQLite table

Source: Internet
Author: User
Tags prepare sqlite

The current conversion only supports MySQL data tables with no foreign keys

Prepare: Download and install Sqlite Expert software

One gets the. sql file in MySQL, gets the procedure omitted can directly export the SQL file

Two new databases in SQLite Expert

Three select SQL Tab in the database, prepare the SQL file before importing

Four key steps

Will create the last statement about the encoded SQL statement primary key to delete

and the creation of the primary key is to modify the creation method will automatically grow deleted, so to speak a little abstract, the following example

This is the way MySQL is built

CREATE TABLE' admin ' (' admin_id ' )int( One)Not NULL auto_increment, ' Admin_username 'varchar( -)DEFAULT NULL, ' Admin_password 'varchar( -)DEFAULT NULL, ' Admin_name 'varchar( -)DEFAULT NULL, ' Admin_sex 'varchar(Ten)DEFAULT NULL, ' Admin_tel 'varchar( -)DEFAULT NULL,  PRIMARY KEY (' admin_id ')) Engine=innodb auto_increment=2 DEFAULT Charset=utf8;
CREATE TABLE' admin ' (' admin_id ' )int( One)PRIMARY KEY  not NULL, ' Admin_username 'varchar( -)DEFAULT NULL, ' Admin_password 'varchar( -)DEFAULT NULL, ' Admin_name 'varchar( -)DEFAULT NULL, ' Admin_sex 'varchar(Ten)DEFAULT NULL, ' Admin_tel 'varchar( -)DEFAULT NULL);

This is the SQL statement that conforms to the SQLite build table.

Mysql table converted to SQLite table

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.