????DDL???
?????????
????DROP TABLE IF EXISTS 't_student';
??????????
????CREATE TABLE IF NOT EXISTS 't_student' ( 'id' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT?? 'name' TEXT?? 'age' INTEGER
????);
????DML???
???????????
????INSERT INTO t_student (name?? age) VALUES ('why'?? 18);
????INSERT INTO t_student (name?? age) VALUES ('lmj'?? 25);
????INSERT INTO t_student (name?? age) VALUES ('lnj'?? 22);
????INSERT INTO t_student (name?? age) VALUES ('yz'?? 17);
????INSERT INTO t_student (name?? age) VALUES ('wsz'?? 28);
????????????
????UPDATE t_student SET age = 30 WHERE name = 'why';
????UPDATE t_student SET name = 'zs' WHERE age > 20;
???????????
????DELETE FROM t_student WHERE name = 'zs’;
????DQL???
???????????
????SELECT * FROM t_student;
???????????????
????SELECT name?? age FROM t_student;
???????????????????
????SELECT name?? age FROM t_student WHERE age <= 25;
??????????????(??????)
????SELECT name?? age FROM t_student WHERE name LIKE '%l%';
???????????????
????SELECT name?? age FROM t_student WHERE name LIKE '%l%' AND age >=25;
????SELECT name?? age FROM t_student WHERE name LIKE '%l%' OR age >=25;
???????????
????SELECT count(*) FROM t_student;
????SELECT count(name) FROM t_student;
????SELECT count(age) FROM t_student;
?????????????
????1> ???? ASC(???)
????SELECT * FROM t_student ORDER BY age;
????2> ????
????DESCSELECT * FROM t_student ORDER BY age DESC;
????3> ?????????????????????????????????????????
????SELECT * FROM t_student ORDER BY age?? name DESC;
?????????
????1> ?????????
????SELECT s.name?? s.age FROM t_student AS s;
????2> ??????????
????SELECT name AS myName?? age AS myAge FROM t_student;
??????????(limit)
????1> ??????
????SELECT name?? age FROM t_student LIMIT 4?? 2;
????2> ???????????:????0???????????????????
????SELECT name?? age FROM t_student LIMIT 5;