I have this table,
CREATE TABLE Person
(
id int auto_increment primary key,
name varchar(20),
Age varchar(30)
);
INSERT INTO Person
(name, Age)
VALUES
('Ganesan', '23'),
('Prasanna', '30'),
('Karthikeyan', '27'),
('RParthiban', '33');
And this query:
select Name, Age from Person HAVING Age > 30;
select Name, Age from Person WHERE Age > 30;
Both queries produces the same output:
NAME AGE
RParthiban 33
Why ? Whats the difference or significance between using Having
and Where
?
I am sure that there must be any. Any examples for each ?
Thanks.