A table contains list of customers and his city with other
details. Each customer has a unique number and the table
consists millions of data. Query is: I want to retrieve 10
customers from each city, no script, only from single query?

Answer Posted / sonal parekh

select Top 10 CustomerName, city from customer

Is This Answer Correct ?    5 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You want to implement the many-to-many relationship while designing tables. How would you do it?

561


Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.

2030


What does COMMIT command do?

626


You want your report to display a hyperlink that will take users to your intranet. How do you configure such a hyperlink?

243


Can foreign key be duplicate?

632






What is the standby server?

521


How do you create type- insensitive operator?

569


how to define testing of network layers? : Sql server database administration

492


What do you understand by the data quality services in sql server?

499


Explain the rules for designing files and file groups in sql server?

550


What are the kinds of subquery?

531


Tell me extended events in sql server 2008?

561


If a table does not have a unique index, can a cursor be opened on it?

517


How do I find the transaction log size in sql server?

519


What are the advantages of user-defined functions over stored procedures in sql server?

462