全部产品
存储与CDN 数据库 安全 应用服务 数加·人工智能 数加·大数据基础服务 互联网中间件 视频服务 开发者工具 解决方案 物联网
云数据库 RDS 版

测试模型

更新时间:2017-06-07 13:26:11

库表结构

  1. CREATE TABLE `sbtest` (
  2. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  3. `k` int(10) unsigned NOT NULL DEFAULT '0',
  4. `c` char(120) NOT NULL DEFAULT '',
  5. `pad` char(60) NOT NULL DEFAULT '',
  6. PRIMARY KEY (`id`),
  7. KEY `k_1` (`k`)
  8. ) ENGINE=InnoDB DEFAULT CHARSET=utf8

数据格式

  1. id: 1
  2. k: 3718516
  3. c: 08566691963-88624912351-16662227201-46648573979-64646226163-77505759394-75470094713-41097360717-15161106334-50535565977
  4. pad: 63188288836-92351140030-06390587585-66802097351-49282961843

SQL样式

查询:

  1. SELECT c FROM sbtest64 WHERE id=4957216
  2. SELECT c FROM sbtest43 WHERE id BETWEEN 4573346 AND 4573346+99
  3. SELECT SUM(K) FROM sbtest57 WHERE id BETWEEN 5034894 AND 5034894+99
  4. SELECT DISTINCT c FROM sbtest50 WHERE id BETWEEN 4959831 AND 4959831+99 ORDER BY c

写入:

  1. INSERT INTO sbtest3 (id, k, c, pad) VALUES (4974042, 4963580, '33958272865-80411528812-36334179010-84793024318-25708692091-43736213170-37853797624-40480626242-32131452190-24509204411', '07716658989-39745043214-17284860193-80004426880-14154945098')

更新:

  1. UPDATE sbtest11 SET k=k+1 WHERE id=5013989
  2. UPDATE sbtest14 SET c='10695174948-02130015518-68664370682-70336600207-55943744221-72419172189-36252607855-75106351226-86920614936-86254476316' WHERE id=5299388

删除:

  1. DELETE FROM sbtest33 WHERE id=5002332
本文导读目录