Advertisement
Guest User

Untitled

a guest
May 30th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. select field1 count(*)
  2. from table_name
  3. group by field1
  4. having count(*) > 1
  5.  
  6. CREATE TABLE Dummy(
  7. `f1` INT(11) NULL DEFAULT NULL,
  8. `f2` INT(11) NULL DEFAULT NULL,
  9. `f3` INT(11) NULL DEFAULT NULL,
  10. `f4` VARCHAR(254) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
  11. `f5` VARCHAR(254) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
  12. `f6` VARCHAR(8) NULL DEFAULT NULL COLLATE 'utf8_unicode_ci',
  13. `f7` DATETIME NULL DEFAULT NULL,
  14. `f8` BIGINT(20) NULL DEFAULT NULL,
  15. `f9` BIGINT(20) NULL DEFAULT NULL,
  16. `f10` DATETIME NULL DEFAULT NULL,
  17. `f11` DATETIME NULL DEFAULT NULL,
  18. `f12` BIGINT(20) NULL DEFAULT NULL,
  19. `f13` DOUBLE NULL DEFAULT NULL,
  20. `f14` INT(11) NULL DEFAULT NULL,
  21. `f15` INT(11) NULL DEFAULT NULL
  22. INDEX `idxF2F3` (`f2`, `f3`)
  23. )
  24. COLLATE='utf8_unicode_ci'
  25. ENGINE=InnoDB
  26. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement