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

What is filestream?

562


What is sql server database?

501


What is sql server agent and what are the two modes of authentication in sql server?

552


What is table value parameters (tvp)?

549


What do you understand by recursive stored procedure?

524






How do I create a trace in sql server?

520


What is user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?

479


What happens to a trigger with multiple affected rows?

533


What is dbcc updateusage?

540


what's the difference between a primary key and a unique key? : Sql server database administration

505


What are partitioned views?

584


How do you debug a procedure in sql server?

499


What are the different types of columns types constraints in the sql server?

529


Tell me what is difference between clustered and non clustered index?

560


What is the difference between ddl,dml and dcl commands?

613