Sunday, July 7, 2013

[T-SQL] Different between two query

[T-SQL] Different between two query


Different between two query

Posted: 06 Jul 2013 08:43 PM PDT

Hi Dear,What is different between two query?query 1:[code="sql"]SELECT dbo.Person.CodeFROM dbo.Person LEFT OUTER JOIN dbo.CustomerSegment ON dbo.Person.CustomerSegment = dbo.CustomerSegment.Code INNER JOIN dbo.CustomerCreditD ON dbo.CustomerSegment.Code = dbo.CustomerCreditD.CustomerSegment LEFT OUTER JOIN dbo.CustomerCreditException ON dbo.CustomerCreditException.Person = dbo.Person.CodeWHERE (dbo.Person.Code = 22122738)[/code]query 2:[code="sql"]SELECT dbo.Person.CodeFROM dbo.CustomerCreditD INNER JOIN dbo.CustomerSegment ON dbo.CustomerCreditD.CustomerSegment = dbo.CustomerSegment.Code RIGHT OUTER JOIN dbo.Person LEFT OUTER JOIN dbo.CustomerCreditException ON dbo.CustomerCreditException.Person = dbo.Person.Code ON dbo.CustomerSegment.Code = dbo.Person.CustomerSegmentWHERE (dbo.Person.Code = 22122738)[/code]Thanks.

Shrink database goes to suspended

Posted: 06 Jul 2013 03:54 AM PDT

Hi friends,I have sql server 2008 R2 enterprise database. I have compressed tables and then created indexes for the same table. Then compressed the same indexes on that table. When am trying to shrink that database, the session is continously in suspended state. After 2 days even 100 MB is not shrunk. Now the available free space of the database is 600 GB. Kindly guide me how to get rid off this issue.Thanks in advance.

No comments:

Post a Comment

Search This Blog