Jobs on the SQLite database 2

Source: Internet
Author: User
Tags sqlite sqlite database

1 Query the sname, Ssex, and class columns of all records in the student table.

SELECT Sname,ssex,class from Student

2 Query teachers All units are not duplicates of the depart column.

SELECT depart from Teachear

3 query all records of the student table.

SELECT * from Student

4 query all records in the score table with scores from 60 to 80.

SELECT degree from score where degree>60 and degree<80

5 Check the records in the score table for grades 85, 86, or 88.

SELECT degree from score WHERE degree=85 or degree=86 or degree=88

6 Check the student table in the "95031" class or sex for "female" students record.

SELECT * from Student WHERE ssex= ' female ' and class= ' 95031 '

SELECT * from Student WHERE ssex= ' female ' OR class= ' 95031 '

7 queries all records of the student table in descending order of class.

SELECT * from Student ORDER by class DESC

8 queries all records of the score table in CNO Ascending, degree descending order.

Ascending: SELECT *from score ORDER by degree ASC

Descending: SELECT *from score ORDER by degree DESC

9 Check the number of students in "95031" classes.

SELECT * from Student WHERE class= ' 95031 '

Jobs on the SQLite database 2

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.