Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting 14 random records
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01382524
Message ID:
01382653
Vues:
30
>>>BTW, how can we search for a specific thread ID ?
>>
>>Just enter the thread ID in the Message ID. A thread ID is the first message ID of the thread.
>
>Thanks. BTW, I'm not sure how to read the results
>
>
>set statistics TIME ON
>/****** Script for SelectTopNRows command from SSMS  ******/
>Select * from [AdventureWorks].[Production].[TransactionHistory] WHERE TransactionID = 
>(Select Top 1 [TransactionID] from [AdventureWorks].[Production].[TransactionHistory]
>Order By NewID() )
>
>SELECT TOP 1 [TransactionID]
>      ,[ProductID]
>      ,[ReferenceOrderID]
>      ,[ReferenceOrderLineID]
>      ,[TransactionDate]
>      ,[TransactionType]
>      ,[Quantity]
>      ,[ActualCost]
>      ,[ModifiedDate]
>  FROM [AdventureWorks].[Production].[TransactionHistory] order by NEWID()
Anyone can run the above query and check the execution plan? Or better on really large table?

Thanks again.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform