SQLite is a lightweight relational database, it is because of its small, mobile platform is widely used, but not suitable for processing large amounts of data and bulk operations. Its bottom layer is written in C, originally designed to be used in
1. Refer to SQLite ADO by add references. NET installation directory in the bin directory of the System.Data.SQLite.DLL.2, create the database file: Because it is always a 0-byte file, you should use IO can also (?!).
SQLite only supports part of the ALTER TABLE statement, we can change the name of a table with the ALTER TABLE statement, or we can add a field (column) to the table, but we cannot delete an existing field, or change the name of an existing field,
To learn SQLite, first of all to understand his advantages and disadvantages, what can be done, just more interested in learning, the network over a bit of information about (casually flip the information, their summary, there may be errors in the
/** * */Package Com.nyist.sqlitedemo;import Java.sql.connection;import java.sql.drivermanager;import Java.sql.resultset;import Java.sql.sqlexception;import java.sql.Statement;/** * @author Yuchao * * @school application and development of mobile
1, SQLite3 is an open-source embedded relational database, portability is good, easy to use, memory overhead is relatively smallSQLite3 is untyped, meaning that you can save any type of data to any table of anyFields 2, SQLite3 commonly used 5 types
Using System.data.sqlite:http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wikiGet System.Data.SQLite.dll added to the project reference;Build tables, insert operations
static void Main (string[] args)
{
Sqliteconnection conn
1. Open the Databaseint Sqlite3_open (const char *filename,//file path for databaseSqlite3 **ppdb//DB instance);2. Execute any SQL statementint Sqlite3_exec (sqlite3*,//an open DB instanceconst char *sql,//SQL statement to executeInt (*callback)
ALTER Table statement:ALTER TABLESql-statement:: = ALTER TABLE [database-name.] Table-name AlterationAlteration:: = RENAME to New-table-nameAlteration:: = ADD [COLUMN] Column-defThe RENAME to syntax is used to rename the table name [Database-name.]
SQLite does not support the following features:1.RIGHT and full OUTER join,left OUTER JOIN is supported.The 2.alter table is not fully supported, only renaming table names and adding column variables are supported, other operations such as deleting
Download the jar package:Http://www.sqlite.com.cn/Upfiles/source/sqlitejdbc-v033-nested.tgz Public classTestsqlite { Public Static voidMain (string[] args) {Try { //connect to SQLite's JDBCClass.forName ("Org.sqlite.JDBC"); //Create a
First, place the SQLite database file under the Resource folder and allow it to be compiled into the project.Then execute some code in the Appdelegate, where the code encapsulates a helper:1 #import "RPDBInitializeHelper.h"2 3
There are two ways to perform SQLite database transactions in C #: SQL code and C # code1.SQL Code:BEGIN ...COMMIT/rollback2.c# Code:using(Sqliteconnection conn =sqlitehelper.getsqliteconnection ()) {dbtransaction trans=Conn.
In the project development, using SQLite accidentally will encounter a variety of db anomalies, online search without this information, write down to record.Exception information:Android.database.sqlite.SQLiteMisuseException:library routine called
In Sqlite3, the structure of the top syntax is not used, and the Sqlite3 uses limit to achieve such a function.The data in the MyTable table is as follows:ID Value1 Hello2 You3 You4 Very Good5 !The following SQL statement: SELECT * FROM
Previous condition: Before operating the ADB shell, remember to start the simulator first, because the ADB shell can be used only when the simulator has been started successfully.
1) Open the command prompt, enter ADB, and press Enter. If you get
Continue to learn! Find information before learning
SQLite SQL Attach Database
Begin transaction
Comment
Commit transaction
Copy
Create Index
Create Table
Create trigger
Create View
Delete
Detach Database
Drop Index
Drop table
Drop trigger
Drop
Android applications may inevitably deal with SQLite. With the continuous upgrading of applications, the original database structure may no longer adapt to new features. At this time, the structure of the SQLite database needs to be upgraded.
SQLite
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