Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ SQL MySQL query table duplicate data     - Ambari and Hadoop configuration, management and monitoring of the project Getting (Server)

- Configuring the PXE server in Ubuntu 14.04 (Server)

- NET Developers need to know some Linux commands (Linux)

- DRBD + Heartbeat solve NFS single point of failure (Server)

- Java concurrent programming combat (using synchronized synchronization method) (Programming)

- MongoDB start under Linux (Database)

- Linux / Unix desktops interesting: Christmas tree on the terminal (Linux)

- How to use tmpfs in RHEL / CentOS 7.0 (Linux)

- Oracle Execute to Parse perform analytical Ratio Analysis (Database)

- Linux iptables: basic principles and rules (Linux)

- CentOS How to mount the hard drive (Linux)

- Ubuntu 15.04 installation Powercommands 2.0 (Linux)

- Java, on the dfile.encoding Systemproperty (Programming)

- Ubuntu Slingscold (Linux)

- Fedora 22 how to play rmvb mp4 mkv video files (Linux)

- Forwarding module with Apache reverse proxy server (Server)

- ASM Management - How to Rename diskgroup (Database)

- Hadoop 2.0 Detailed Configuration Tutorial (Server)

- SQL Server 2008 database synchronization Notes (Database)

- SVN common commands (Linux)

 
         
  SQL MySQL query table duplicate data
     
  Add Date : 2018-11-21      
         
         
         
  MySQL duplicate data look-up table, for example, now you need to check out the bar code table duplicate records, SQL as follows:

SELECT GUIDE_BARCODE FROM checker_barcode

GROUP BY GUIDE_BARCODE HAVING COUNT (GUIDE_BARCODE)> 1

Enquire now duplicate sql data is out, but generally will write sql might like me to write:

SELECT GUIDE_BARCODE FROM checker_barcode

where COUNT (GUIDE_BARCODE)> 1

GROUP BY GUIDE_BARCODE

The latter condition as having the condition where the query, but when the count as a function of where the query conditions, sql grammar is wrong, because W3School about having a function to introduce the sentence is:

Increase HAVING clause in SQL because, WHERE keyword can not be used with aggregate functions.

That is to say, these five conditions where the function can not be used together, but may be used together check out the desired result and having.

Total function: mysql aggregate categories include five kinds of functions: avg, count, sum, min, max.
     
         
         
         
  More:      
 
- Use apt-p2p up a local Debian package cache (Server)
- CentOS 7 - use cgroups limit process resource (Linux)
- Use CutyCapt to convert HTML pages to png images on Linux (Linux)
- Search Linux commands and files - which, whereis, locate, find (Linux)
- HomeKit User Interface Guidelines (Linux)
- There are more than one server, there is reason to try cloud operating system (Server)
- Zabbix monitors Nginx status (Server)
- Linux-du and df command (Linux)
- Oracle 11g partition maintenance (two) - Coalescing Partitions (Database)
- Python implementation Bursa transition model (Programming)
- Ubuntu study notes and related problem solving (Linux)
- How to configure SNMPv3 on Ubuntu, CentOS and Cisco systems (Linux)
- Linux run queue process scheduling (Programming)
- Oracle TDE transparent data encryption (Database)
- Linux system - The understanding cpu load (Linux)
- Setting CentOS firewall open port (Linux)
- Java and Python use make way dictionary word search script (Programming)
- MySQL optimization of the relevant Group By (Database)
- Ubuntu 15.04 install Complete Guide (Linux)
- To achieve a two-way static NAT stateless available modules on Linux (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.