C # considerations for SQLite Database Development

Source: Internet
Author: User
1: The SQL command ends with a semicolon (;) and two minus signs (;) represent comments.
2: Create film (name, length)
3: The slite field can store anything and will be automatically converted in due time
4: index creation speeds up create index mytitle on film (name)
5: insert into film values ('myname', 118). If no value exists, enter null.
6: query data select * from film query data limit number select * from film limit 10
Sort select * from film order by name DESC limit 10
Query the specified condition select * from film where name = 'myname'
Statistics count select count (*) from film
7. modify data update film set name = 'liudianwu' where name = 'myname'
8: delete data from film where name = 'liudianwu'
9: when a large amount of data is inserted, run the begin command to insert the data and write the data into the database.
10: SQLite paging select * From log Limit 20, 10 (10 data records from 20th data records) Select * From log limit 10 offset 20
11: The auto-increment field is declared as integer primary key.
12: Multi-Table query select * From grogshopdata inner join grogshopinfo using (grogshopid)
13. Compress and clear the database and execute the VACUUM command.
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.