Apply for Zend Framework Certification Training


    SUM(employee_salary) AS salaryCount,
    SUM(employee_basic) AS salarybasic
GROUP BY designation
HAVING employee_salary > 10000;

HAVING employee_salary > 10000 AND employee_designation = 'cleark'; 


REPLACE INTO employee(emp_id,emp_name) VALUES(23,'Rajesh');                                    

     HAVING Clause
MySQL HAVING clause is used in the SELECT statement to specify
filter conditions for a group of rows or aggregates.
If the new row already exists, the MySQL REPLACE statement inserts a new row.
If the new row does not exist, the REPLACE statement deletes the old row
first and then inserts a new row.
In some cases, the REPLACE statement updates the existing row only.
To determine whether the new row already exists in the table, MySQL
uses PRIMARY KEY or UNIQUE KEY index. If the table does not have
one of those indexes, the REPLACE statement is equivalent to the
INSERT statement.

< How to retrieve second maximum salary in Mysql Mysql stored procedure >

Ask a question

  • Question:
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question

Back to Top