Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Select duplicated rows
MySQL
by
Andrey Romanov
14th March 2016
SELECT field_name, COUNT(*) c FROM table_name GROUP BY field_name HAVING c > 1;
3 Responses
This works in all dbs?
1
Reply?
K
kim
8 years ago
@kim
yep. just change `field_name` and `table_name` to your values
0
Reply?
AR
Andrey Romanov
8 years ago
@Andrey Romanov
thanks :)
0
Reply?
K
kim
8 years ago
Write a comment
Send Comment
You can use [html][/html], [css][/css], [php][/php] and
more
to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.
3 Responses
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.