• web中操作sqlite数据库


    sqlite-web 是用Python编写的基于Web的SQLite数据库浏览器。

    安装

    $ pip安装sqlite-web

    用法

    $ sqlite_web database.db

    调用sqlite-web的语法是:

    $ sqlite_web [选项] /path/to/database-file.db 提供以下选项

    -p,--port:默认为8080

    -H,--host:默认为127.0.0.1

    -d,--debug:默认为false

    -x,--no-browser:不要打开Web浏览器的sqlite-网络启动时。

    -P,--password:提示输入密码以访问sqlite-web。或者,可以将密码存储在“ SQLITE_WEB_PASSWORD”环境变量中,在这种情况下,应用程序将不提示输入密码,而是使用环境中的值。

    -r,--read-only:以只读模式打开数据库。

    -u,--url-prefix:应用程序的URL前缀,例如“ / sqlite-web”。

    -c,--cert并且-k,--key-指定的SSL证书和私钥。

    -a,--ad-hoc-使用临时SSL上下文运行。

    条件查询
    select * from 表名 where 条件
    *:代表所有列
    条件:一般都是where加条件表达式
    查询列里包含数字或字母:select * from 表名 where 列名='值'
    示例:
    select * from TL_REQUEST where BU_NO='1234'
    select * from TL_REQUEST where BU_NM='小芳'
     
    范围查询
    select * from 表名 where 列名 between 'A' and 'B'
    或
    select * from 表名 where 列名>='A' and 列名<='B'
    示例:
    select*from TL_REQUEST where BU_NO between '1000' and '1234'
    select*from TL_REQUEST where BU_NO>='1000' and BU_NO<='1234'
    
    多条件查询
    或条件查询:or
    select * from 表名 where 列名='A' or列名='B'
    示例:select * from TL_REQUEST where BU_NO='1000' or BU_NO='1234'
    和条件查询:and
    select * from 表名 where 列名='A' and列名='B'
    示例:select * from TL_REQUEST where BU_NO='1000' and CONTRACT_NO='tl001'

    原文链接:https://blog.csdn.net/alice_tl/article/details/88686628

  • 相关阅读:
    YOLOv5-QAT量化部署
    IAP固件升级进阶(Qt上位机)
    Hadoop面试题和答案
    Go语言解析表单form里提交的值以及错误处理
    2023年IB生物有什么变化?
    Shiro <shirohasPermission 标签不生效,shiro权限不生效原因
    python科研做图系列之雷达图
    【力扣 - 多数元素】
    Linux系统导入导出docker容器的sql数据
    2.2.1 嵌入式工程师必备软件
  • 原文地址:https://blog.csdn.net/s651665496/article/details/132788927