Apply for Zend Framework Certification Training

Mysql




              
SELECT 
    employee_id,
    SUM(employee_salary) AS salaryCount,
    SUM(employee_basic) AS salarybasic
FROM
    employee
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.
Examples
     REPLACE
----------------------------------
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.

< Regular Expression in php dynamically create textbox using javascript >



Ask a question



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


Back to Top