Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8551173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:08:13+00:00 2026-06-11T14:08:13+00:00

I was exploring someone’s code and I have found this query.This query is fetching

  • 0

I was exploring someone’s code and I have found this query.This query is fetching data using join. But there is no use of inner join, outer join, left or right. The programmer simply writes this query.

I found this is the SMART way of writing query, if this query is right ?

SELECT 
    a.*,b.*,c.*,d.*,e.* 
FROM  
    property_photos a,property_promotions b,properties c, communities d,cities e 
WHERE 
    a.property_id = b.property_id AND 
    a.property_id = c.id AND 
    (b.promotion_id =2 OR b.promotion_id =1) AND 
    a.mainphoto="Y" AND 
    d.id=c.community_id AND 
    e.id = c.city_id AND 
    a.featured_status = 1

Is this query correct?

It this query is right, the i think, this is more better way to write queries since it will save a lot of disk space instead of use Left join/right Join like words which makes query long

SMARTY WAY

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:08:15+00:00Added an answer on June 11, 2026 at 2:08 pm

    Yes it is alright. It is the same as an INNER JOIN.

    Note:

    Which Syntax to Use? Per the ANSI SQL specification, use of the INNER
    JOIN syntax is preferable. Furthermore, although using the WHERE
    clause to define joins is indeed simpler, using explicit join syntax
    ensures that you will never forget the join condition, and it can
    affect performance, too (in some cases).

    Source: Sam’s – MySQL Crash Course, page 139

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hope someone can help, I'm not a programmer, but have been interested in exploring
I've been exploring methods for full-width background images combined with type. I found this
I have been exploring patterns in various MV* frameworks out there and today noticed
I have been exploring different answers about release management in Mercurial and almost found
Can someone check whether the code below is correct? The code is found at
I am interested in exploring how R can handle data out-of-memory. I've found the
Lately, i have been exploring the source code of OutputCache attribute in asp.net mvc-3
I am exploring Qt source code and came across this Q_D macro. Could some
I'm surprised that this hasn't come up before but I haven't found anything in
I'm currently exploring django forms and have a issue I hope someone can help

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.