TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bharat Bhushan
NA
176
158.8k
Query in sql server
Jan 15 2014 4:12 AM
Hello Developers
I have three tables named
tb_fst_form
id district identification
1 Amritsar yes
2 Amritsar yes
3 Bathinda Yes
4 Barnala Yes
tb_second_form
id district identification
1 Gurdaspur yes
2 Amritsar yes
3 Bathinda Yes
4 Barnala Yes
tb_third_form
id district identification
1 Tarntaran yes
2 Amritsar yes
3 Bathinda Yes
4 Barnala Yes
Now i need an sql query to fetch combine records from three tables district wise
Like
District fst_table_count second_table_count third_table_count
Tarntaran 0 0 1
Amritsar 2 1 1
Barnala 1 1 1
Bathinda 1 1 1
Gurdaspur 0 1 0
Please help me to create the mysql query
Thanks
Bharat Bhushan
Reply
Answers (
1
)
How to use transactions?
SQL Query taking too much time to fetch single data