SQL Query to display a random record from table in sqlserver.
Syntax:Select Top 1 * From tablename Order By NewId()
Example:Select Top 1 * From emp Order By NewId()
Above query will display one random record.
SQL Query to copy structure and data of one table to other in Sql Server.
Software Testing-QTP,Testing Tools,Testing Faqs
Collection of SQL Queries
Showing posts with label query to dispaly random record in sqlserver. Show all posts
Showing posts with label query to dispaly random record in sqlserver. Show all posts
Subscribe to:
Posts (Atom)