home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,183 of 19,505   
   Gene Wirchenko to sorrytoomuchspamalready@xs4all.nl   
   Re: Index or ORDER BY Using Another Tabl   
   02 Apr 11 21:01:41   
   
   XPost: microsoft.public.sqlserver.programming   
   From: genew@ocis.net   
      
   On Sat, 02 Apr 2011 10:29:46 +0200, Gert-Jan Strik   
    wrote:   
      
   >>  Can I do this (get at Accounts.ACOrd) in SQL Server without a join?   
   >   
   >No. Since you need columns from two tables, you need both tables in your   
   >query (joined on the foreign key relationship)   
      
        I figured that was probably so.  Thank you for confirming it.   
      
   >>  Did I define my indexes properly?   
   >   
   >When you declare a Primay Key constraint or Unique constraint, SQL   
   >Server will automatically create unique indexes to enforce these   
   >constraints. Because of that, you should not declare an identical index   
   >yourself such as index ACUK or index SAUK.   
      
        thank you.  I missed that.   
      
   >Other than that, your indexes look fine.   
   >   
   >If you are not already familiar with it, and want to learn more about   
   >it, then it might be useful for you to read about the differences   
   >between clustered and nonclustered indexes.   
      
        I will be doing a reread shortly, I think.   
      
        Thank you for the help.   
      
        Some of my questions probably seem silly.  It is not that I do   
   not know so much as I do not know the best way.  I am transitioning   
   from Visual FoxPro to SSE.   
      
   Sincerely,   
      
   Gene Wirchenko   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca