4 Please write a querry to find repeated numbers in the
following table.
Table Name: Table1
Field1
10
15
20
15
10

Answer Posted / lalit pandey

SELECT field1,count(field1) "Number of Occurrence"
FROM table1
GROUP BY field1
HAVING COUNT(field1)>1;

Is This Answer Correct ?    37 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?

513


What is a natural primary key?

523


How to use union to merge outputs from two queries together in ms sql server?

556


Explain having clause and where clause?

581


Which are the new data types introduced in sql server 2008?

513






Why do you want to join software field as you have done your BE in Electronics?

1705


How to change the ownership of a schema in ms sql server?

563


How to get a list all databases on the sql server?

581


Different types of keys in SQL?

630


What are sub reports and how to create them?

99


How to get a list of columns in a view using the "sp_columns" stored procedure?

616


What is Dependency Injection and provide example?

616


What are the different acid properties?

623


How to invoke a trigger on demand?

543


What is temporal data type?

525