edit-icon download-icon

Test model

Last Updated: Jan 29, 2018

Database table structure

  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

Data format

  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 style

Query:

  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

Write:

  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')

Update:

  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

Delete:

  1. DELETE FROM sbtest33 WHERE id=5002332
Thank you! We've received your feedback.