1:html:超文本标记语言。里面有不少标记:主要是作静态页面。
静态页面:何时都是不变的。
动态页面:不一样时间访问是不同的,动态页面是在静态页面的基础上加了其余的web开发语言。asp.net,jsp,
2:html的文件都在浏览器里去查看的。浏览器才能够去解析这样的文件。
3:html文件的后缀是.html或者htm
4:sqlite数据库:移动系统的数据库,轻量级数据库。用户本身的数据库就在本身的手机上,因此就没有什么数据安全方面的问题。基本上都是单表操做。
sqlite数据库中的数据类型;String;字符串,Integer:整数。
null:空的,real:小数。blob:二进制数据。sqlite数据库中的数据都是由具体的值来肯定的。html
-----------------------------------------------------------------------------------------------------web
------建立表结构-
-- sqlite的数据类型:text,integer,real,null,blob,----
----建立表的时候能够不写数据类型,数据库会根据具体值来肯定它的数据类型。------------
create table if not exists student(
_id integer primary key autoincrement not null,
name string not null,
age integer not null,
height real,
sex string not null ,
classname string not null
)
----删除表------
drop table student
------往表里面添加数据。 insert into 表名(字段1,字段2) values(值1,值2)--------
------插入一条数据-------
insert into student(name,age,height,sex,classname)
values('小红',22,162,'女','and1505')
-----插入多条数据-------
insert into student(name,age,sex,height,classname)
values('李丰',23,'男',180,'and1510'),
('小燕',22,'女',159,'and1505')
------查询表中的数据---------------
-------查询全部的数据 select-------------
select * from student
------修改数据------
---- update 表名 set 字段 =值-------------
update student set height=163 where _id=7
------班级为and15010,男,height不为null,则每一个高度都增加1
update student set height = height+1
where classname='and1510'
and sex='男'
and height not null
---------------凡是1510班年龄减1----
update student set age = age-1 where classname='and1510'
-------------凡是1510班或者性别为女的则高度+1----------------------
update student set height = height+1
where classname='and1510'
or sex='女'
--------修更名字的第一个字为小的年龄减1岁------------------------
update student set age =age-1
where name like '小%'
---------修更名字为小谢或者为小红的班级为and1511-----------
update student set classname='and1511'
where name='小王' or name='小谢'
-----------修更名字为小谢或者为小红的班级为and1510----------------
update student set classname='and1510'
where name in ('小王','小谢')
--------修更名字的第一个字为小字变成大字---------------
update student set name = replace(name,'小','大')
where name like '小%'
------------删除数据 delete from 表名 where ---------------------
--------删除高度为null的数据-------
delete from student where height is null
select * from student
------删除全部的数据----------
delete from student
----------删除名字含有'燕'的记录-----------------
delete from student where name like '%燕%'
----------删除高度小于160的记录------------
delete from student where height<160
-------查询 select 字段 from 表---------------------
--------查询性别为女的-----------------
select * from student where sex='女'
---------查询全部的---------------
select * from student
-----查询and1510班的学生的姓名------------
select name from student where classname='and1510'
-------查询年龄20-25以前的学生-----------------
select * from student where age>=20 and age<=25
-------------查询名字里含有大的学生--------------------------------
select * from student where name like '%大%'
---------查询and1510班女生,而且按年龄从小到大排序- order by,降序 desc,升序asc,默认就是升序---------------------
select * from student
where sex='女'
order by age desc
-------------查询全部女生,而且按年龄从小到大排序-,只显示前3个----
----limit 偏移量0表示第一个,显示的个数-----
select * from student
where sex = '女'
order by age
limit 1,3
---查询出1510班的总人数--------
select count(*) from student where classname='and1510'
------查询出1510班的全部人的年龄总和---------------
select sum(age) from student
where classname='and1510'
-------查询出1510班的平均年龄-------------
select avg(age) from student
where classname='and1510'
-----------------查询全部的班级的男性人数,而且按班级进行分组 group by ---------
select classname,count(*) from student
where sex = '女'
group by classname
-----查询1510班年龄最大的学员-----------
select max(age),name from student
where classname='and1510'
------查询1505班年龄最小的学员--------
select min(age) ,name from student
where classname='and1505'
-----查询班上的全部女学员,按班级进行分组,再进行降序,而且只列出总人数大于等于1个班级-----------
select classname ,count(*)
from student
where sex='女'
group by classname
having count(*)>=1
order by count(*) asc
-------where---group---having---排序 ------------sql
---------------------------------------------------------------数据库