Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
mysql - having
DROP TABLE IF EXISTS tutorials_tbl; create table tutorials_tbl( tutorial_id INT NOT NULL AUTO_INCREMENT, tutorial_title VARCHAR(100) NOT NULL, tutorial_author VARCHAR(40) NOT NULL, submission_date DATE, datetime DATETIME, timestamp TIMESTAMP, year YEAR, PRIMARY KEY ( tutorial_id ) ); INSERT INTO tutorials_tbl (tutorial_title, tutorial_author, submission_date,datetime,year) VALUES ("Learn PHP", "John Poul", NOW(),NOW(),NOW()); INSERT INTO tutorials_tbl (tutorial_title, tutorial_author, submission_date,datetime,year) VALUES ('2'|1|'7', "John Poul", '1973-12-30''','1973-12-30''',1901-1||1901-0); SELECT COUNT(tutorial_id), tutorial_author FROM tutorials_tbl GROUP BY tutorial_author HAVING COUNT(tutorial_id) =2 and 1=1;
run
|
edit
|
history
|
help
0
nesha
cs
ruthresh1
Sql
dbms queryn2
nw
new_road
chandu
ITM_14210069
MySQL Practice