write a query to dispaly those name who is more than one in
student table?
example- in a student table sandeep kumar comes 4 times,
rakesh kumar comes 2 times, ajit kumar comes 1 times so
query will display sandeep kumar and rakesh kumar single
times.
Answers were Sorted based on User's Feedback
Answer / neha_gupta
select ename,count(1) from student
group by ename
having count >1
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / u.radha
SELECT STUD_NAME,COUNT(*) FROM STUDENT GROUP BY STUD_NAME
HAVING COUNT(*) > 1
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / gourav
select first_name,count(*) from employees
group by first_name
having count(*)>1;
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / seethal
select stu_name from(select stu_name,count(stu_name) sc from
stu_table group by stu_name)where sc > 1;
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / dheer
select v_id from dup where rowid not in (select max(rowid)
from dup group by v_id);
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / cheeku
select distinct NM from
(
(select name from student_tbl M where exists
(select 1 from student_tbl S where
S.name = M.name and
S.rowid <> M.rowid)
)NM;
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / valmiki sreenivasulu
A)select sname from student group by sname;
| Is This Answer Correct ? | 3 Yes | 4 No |
Answer / abrar yaseen
select student_name from student group by student_name
having count(OCCURANCE) > 1
| Is This Answer Correct ? | 0 Yes | 2 No |
what is the difference between simple view and complex view?
i can create a view with two columns from emp table,, later i need to add one more emp column to existing view.. what is query similarly add one more column to existing primary key constraint.. please give me the solutions
I have query like this. select dept_id, max_mark from stude_dept where min_mark= (select min(mini_mark) from stud_dept); How can i optimize this query. Can anyone help me with it
Does facebook use oracle?
Explain the use of file option in exp command.
how to i write the query 'NISHI' TO N I S H I
4 Answers Attra, Metric Stream,
What is a Public Synonyms ?
how to get count of tables in particular database in Oracle?
HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE
What is an Index Segment ?
Tell me New Feature of Oracle 10g?
how table is defined in plsql table? how can i select column from plsql table? can i use select * from plsql table type?