标签:
一. 基础创表操作:
CREATE TABLE IF NOT EXISTS t_dog(name text, age bolb, weight real);
INSERT INTO t_shop (name, left_count) VALUES (‘扇子‘, 100);
UPDATE t_shop SET price = 6288, left_count = 0;
DELETE FROM t_shop;
DROP TABLE t_dog;
二. 条件语句
UPDATE t_shop SET left_count = 0 WHERE price < 1000;
DELETE FROM t_shop WHERE left_count < 70 AND price < 500;
DELETE FROM t_shop WHERE left_count < 70 OR price < 500;
SELECT name, price, left_count FROM t_shop;
SELECT * FROM t_shop WHERE left_count > 80;
CREATE TABLE IF NOT EXISTS t_class (id integer PRIMARY KEY AUTOINCREMENT, name text NOT NULL UNIQUE);
INSERT INTO t_class(name) VALUES (‘ios‘);
INSERT INTO t_class(name) VALUES (‘andriod‘);
标签:
原文地址:http://www.cnblogs.com/guangleijia/p/5023642.html