Some General Questions

Discussion in 'Database' started by shoaibi, Nov 14, 2006.

  1. shoaibi

    shoaibi New Member

    Joined:
    Nov 14, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Consider a table T1 with c1,c2,c3, and c4. Suppose c4 is removed from schema definition of T1. Instead a new table T2 is defined with c1, and c4 as its coluns. Now SELECT c1,c2,c3,c4 FROM t1 fails as an embedded query, in a host language. Resolve this issue so that no chnage in the form of a software patch is required in the application software that is using the embedded query.....

    Then i wanna know the benefits of Outer Join.

    My idea of first question is that we use SELECT * instead of specifying eahc column name in the SELECT Query.
    and in 2nd i think it tells about the voilations of that are occured in a join, i.e. value in Table A such that nothing exists for that value on Table B.
     
  2. rahulnaskar

    rahulnaskar New Member

    Joined:
    Aug 26, 2004
    Messages:
    25
    Likes Received:
    2
    Trophy Points:
    0
    Ans to Q1.
    Table T1 should have all the columns that were mentioned in the embedded query, because that will always fail if you are trying to retrieve a column by name which doesn't exist. As per your question SELECT * will do, but then again the same needs an application software patch, which according to you should be avoided first hand.
    Ans to Q2.
    Outer join selects all records as per the criteria from table A and looks for a parellal record in table B. If table B doesn't hold that record (as per the joining condition), blanks are returned from table B.
    In simple terms all records from table A will be fetched in the query though the same might not be present in table B
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice