Compilation and exercise of SQLite

Source: Internet
Author: User

[Disclaimer: All Rights Reserved. You are welcome to reprint it. Do not use it for commercial purposes. Contact Email: feixiaoxing @ 163.com]

SQLite has never been heard of before, but it has never been used. Today, we downloaded the source code from the official SQLite website, that is, the source code above ww.sqlite.org. It is very easy to use. The steps are very simple for your reference. This is only used as a learning database, not linked to your own code as a dll library or lib library, so you can simply generate an execution file.

(1) first download the latest SQLite code, http://www.sqlite.org/download.html, the first address at the source code;

(2) After downloading the file locally, decompress it. We found that there are actually four files, namely shell. C, sqlite3.c, sqlite3.h, and sqlite3ext. h;

(3) create a local VC console project and add four files to the project;

(4) directly input F7. the compiler will compile and link to generate a version;

(5) In the DEBUG directory, a sqlite3 execution file is ready.

In order to test whether our SQLite is easy to use, we can immediately start the execution file. If it remains in the compiler, press F5 to print the SQLite>, at this time, we can enter the content, for example, creating a table at will,

 

Create Table tbl1 (one varchar (10), two smallint );

Insert into tbl1 values ('hello', 10 );

Insert into tbl1 values ('China', 20 );

Select * From tbl1;

With the above operations, we can smoothly create a table, insert our own data into the table, and output and print the data. As for the subsequent content, you can continue to learn and improve according to the online tutorials.

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.