数据库和SQL语句
一.数据库
1.创建数据, 找到数据库文件-create table if not exists Contact (c_id integer primary key autoincrement, c_name text, c_gender text)
2.创建表-create table if not exists Teacher (tea_id integer primary key autoincrement, tea_name text, tea_salary text)
3.插入数据
insert into Teacher (tea_id, tea_name, tea_gender, tea_age, tea_salary) values (38, '二涛', '男', 38, '250’)
insert into Teacher (tea_name, tea_gender, tea_age, tea_salary) values ('大神', '男', 38, '250’)
4.查询数据-select tea_name, tea_gender from teacher - select * from teacher
5.更新数据 - update Teacher set tea_gender = '女' where tea_name = ''
6.删除 - drop table teacher - delete from teacher where tea_id = 38;
MRC --- ARC(让ARC文件在MRC的环境下进行ARC编译) -fobjc-arc
ARC --- MRC(让MRC文件在ARC的环境下进行MRC编译) -fno-objc-arc
xml 解析, dom解析, joon解析
二SQL语句
创建表
create table if not exists Teacher (tea_id integer primary key autoincrement, tea_name text, tea_gender text, tea_age integer, tea_salary text)
插入数据
insert into Teacher (tea_id, tea_name, tea_gender, tea_age, tea_salary) values (38, '豪豪', '男', 38, '250’)
insert into Teacher (tea_name, tea_gender, tea_age, tea_salary) values ('大神', '男', 38, '250’)
查询所有数据
select * from teacher
查询 姓名, 性别
select tea_name, tea_gender from teacher
条件查找
select * from teacher where tea_name = '豪豪’
更新数据
update Teacher set tea_gender = '女' where tea_name = '豪豪’
删除
drop table teacher
delete from teacher where tea_id = 38;