zoukankan      html  css  js  c++  java
  • 软件测试面试准备

    1、关于数据库

    https://www.cnblogs.com/action1/p/14356722.html

    删除:

    (1)删除1条数据:delete from 表名 where 字段名1 = 字段值1

    (2)删除表里所有数据:delete from 表名

    更新:

    (1)更新数据:update 表名 set 字段名1 = 字段值1 where 字段名2 = 字段值2

    (2)修改表里所有数据:update 表名 set 字段名1 = 字段值1

    查询:

    (1)字段查询:select 字段名1、字段名2、字段名3 from 表名

    (2)排序(降序):select * from 表名 order by 字段 desc

    (3)排序(升序):select * from 表名 order by 字段 asc

    (4)去重:select distinct 字段 from 表名

    (5)范围限定:select * from 表名 where 字段 between 10 and 20

    (6)子集限定:select * from 表名 where 字段 in (字段值1,字段值2)

    (7)数量:1)基本语法:group by 字段 having 条件

                        2)常用函数:count求总数,max,min,sum求平均值,avg求和

    (8)左连接:select  *  from 表1 left join 表2 ON 表1.字段1 = 表2.字段1

                           select  表1.字段1,表1.字段2,表2.字段1  from 表1 left join 表2 ON 表1.字段1 = 表2.字段1

                           select  表1.字段1 a.字段1,表1.字段2 a.字段2,表2.字段1 b.字段1  from 表1 left join 表2 ON a.字段1 = b.字段1

    (9)右连接:select  表1.字段1,表1.字段2,表2.字段1  from 表1 right join 表2 ON 表1.字段1 = 表2.字段1

    (10)内连接:select  表1.字段1,表1.字段2,表2.字段1  from 表1 inner join 表2 ON 表1.字段1 = 表2.字段1

    2、redis内存数据库

    (1)访问:切换到redis目录下运行(配置全局环境变量就不用):redis-cli.exe -h 127.0.0.1 -p 6379

    (2)基本使用:1)String: SET key member   

                                     获取操作:GET key

                               2)Hash:HMSET key field1 "Hello" field2 "World"

                                    获取操作:HGET key field1

                                                      HGETALL key field1

                               3)List:1push key member

                                    获取操作:lrange key 0 10

                               4)Set:sadd key member

                                    获取操作:smembers key

                               5)Sorted Set:zadd key score member

                                    获取操作:ZRANGEBYSCORE key 0 1000

                      

  • 相关阅读:
    zabbix:以主动模式添加一台受监控主机 (zabbix5.0)
    linux(centos8):用grep命令查找文件内容
    zabbix安装中文语言包及中文乱码的解决(zabbix5.0)
    性能测试常用术语
    Java 读写Properties配置文件
    携程Apollo配置中心架构深度剖析
    jmeter 使用csv文件 注意项
    CnPlugin_1.5.1 解决win10 pl/sql 输入法卡顿 兼容性问题
    jmeter(psot) 表单提交 注意项
    全新OCR3500数据
  • 原文地址:https://www.cnblogs.com/nali7/p/15745279.html
Copyright © 2011-2022 走看看