sql

1.sql语句不区分大小写

2.每条语句必须以;结尾,字符串用'单引号

3.DDL:Data Definition Language(create table or drop table)

4.DML:Data manipulation Language(insert update delete)

5.DQL:Data Query Language(select)

6.integer:整型值,real:浮点值,text:字符串,blob:二进制数据

7.语句:

create table if not exists t_mydatabase (字段名 字段类型,。。。);

create table t_mydatabase(id integer not null unique, age integer not null default 1,bo integer primary key autoincrement);

drop table if exists t_mydatabase;

insert into t_mydatabase (字段名,字段名) values('yin','ting','ting');

update t_student set school = 'zhongxue', no = 13;

delete from t_mydatabase where 字段 = 字段值 and(or) 字段 = 字段值;

select * from t_mydatabase where age > 10;

select 字段 别名,字段 as 别名,。。。from t_mydatabase 别名;

select 别名.字段 from t_mydatabase as 别名;

select count(字段)from t_mydatabase

select * from t_mydatabase order by score asc, height desc;

select * from t_mydatabase limit 2,10 跳过前面两个,取10条数据

                                         limit 7 表示取前面7条数据

posted @ 2015-11-09 17:07  Emyin  阅读(116)  评论(0编辑  收藏  举报