--创建数据库
create database ios
--使用数据库
use ios
--创建数据表
create table student
(
stuid int primary key autoincrement,
stuname varchar(20),
stupwd varchar(20)
)
--查询所有信息
select * from student
--增加信息
insert into student(stuname,stupwd)
values ('lisi','123456')
--修改
update student set stuname = '李四'
where stuid = 1
update student set stuname = '李四',stupwd='Sd123'
where stuid = 1
--删除
delete from student where stuid=1
—做登录时使用
select *from student where shtuname=‘lisi’ and stupwd=‘123123'
--显示指定信息
select tsunami from student
—根据指定进行排序 默认是升序排列(asc)降序排列(desc)
select tsunami from student order by stuname desc