SQL - Inner joins

Results 1 to 2 of 2

Thread: SQL - Inner joins

  1. #1
    Charlie Bullit Guest

    Default SQL - Inner joins

    I probably havn&#039t understood the potential of the inner join. Could someone explain to me the diffrence between a inner join and a connection like this:<BR><BR>SQLStmt = "SELECT * FROM Table1, Table2 Where Table1.Id = Table2.Id "<BR>Set RS = Connection.Execute(SQLStmt)<BR><BR>Would a connection with a inner join be more powerfull (faster, less demanding on the server) or can&#039t you use a inner join to connect two tables like this?

  2. #2
    Scott S Guest

    Default RE: SQL - Inner joins

    Your SQL statement does the exact same thing as an inner join. However you should use the inner join statement because it is the correct way. The Where statement is reserved for criteria.<BR><BR>"SELECT * FROM Table1, Table2 INNER JOIN Table2 ON Table1.ID = Table2.ID Where Table1.ID=123;<BR><BR>HTH<BR><BR>--Scott

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •