zoukankan      html  css  js  c++  java
  • ios开发之数据库FMDB

    选择以下按钮进行编辑

     

    数据库的创建

    create table if not exists StudentInfo(sid integer,username vachar(20),password vachar(20),scare vachar(20))

    插入

    insert into StudentInfo(sid,username,password,score)

    values(1501,'zhangsan','123','100’)

    查询

    select "from StudentInfo”;

    查询指定字段

    select username from StudentInfo;

    查询指定条件的信息

    select *from StudentInfo where username=‘zhangsan’

    根据指定多个条件查询

    select *from StudentInfo where username='zhangsan' and password=‘123'

    默认升序排序

    select *from StudentInfo order by score

    降序排序

    select *from StudentInfo order by score desc

    统计行数

    select count(*)from StudentInfo

    修改数据

    update StudentInfo set score='100' where username='zhangsan’;

    删除数据

    delete from StudentInfo where sid='1502'

  • 相关阅读:
    学无止境,我爱python
    Flask目录
    Django目录
    前端目录
    python目录
    MySQL目录
    Oracle与Sql server的区别
    Git
    restful规范
    Django 解决跨域问题(写入到中间件中)
  • 原文地址:https://www.cnblogs.com/xjia/p/4389609.html
Copyright © 2011-2022 走看看