GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Database  >  MYSQL

 Print  |  
Question:  How we can count duplicate entry in particular table against Primary Key ? What are constraints?



September 09, 2006 02:18:23 #7
 Mukesh   Member Since: Visitor    Total Comments: N/A 

RE: How we can count duplicate entery in particular ta...
 
select count(*) from tablename where count(*) >1 group by empno;this query generate an error use right syntex groupbyI have a table name -> empfields -> id (int autoincremented),name (varchar),sal(int)used query ->select count(*) from emp where count(*) >1 group by id;
     

 

Back To Question