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 6591753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:27:58+00:00 2026-05-25T17:27:58+00:00

I used to write select clause in side select clause to avoid joins in

  • 0

I used to write select clause in side select clause to avoid joins in from clause. But I am afraid that is it a good coading practice or it will degrade database performance. Below is the query which contains multiple tables but I have written it using nested select clause without any join statement. Please let me know if I am making any mistake or it is ok. At this moment, I am getting accurate result.

SELECT * ,
       (select POrderNo from PurchaseOrderMST POM 
        where POM.POrderID=CET.POrderID)as POrderNo,
       (select SiteName from SiteTRS ST where ST.SiteID=CET.SiteID)as SiteName,
       (select ParticularName from ParticularMST PM where   
        PM.ParticularID=CET.ParticularID)as ParticulerName  
FROM ClaimExpenseTRS CET
WHERE ClaimID=@ClaimID  
  • 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-05-25T17:27:58+00:00Added an answer on May 25, 2026 at 5:27 pm

    I’d use joins for this because it is best practice to do so and will be better for the query optimizer.

    But for the learning just try to execute the script with join and without and see what happens on the query plan and the execution time. Usually this answers your questions right away.

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

Sidebar

Related Questions

I used to write my EXISTS checks like this: IF EXISTS (SELECT * FROM
I need to write a MultiThreaded Java Application that will be used to load
I am trying to write a procedure that will fire the same select query
I'm trying to build a list that will be used as the in clause
I write programs used internally by our company. I've created several support DLLs that
I need write an update statement that used multiple tables to determine which rows
I need to write a program used internally where different users will have different
I'm trying to write a simple php function that will strip everything between two
I want to write a select clause according to conditional condition! bu I have
I want to write a funcion or procedure that can be used in the

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.