how to find the First and Last Observation from the table:
Ex: OBS Name Sal Ans like: OBS Name Sal
105 E 5000--> 105 E 5000
102 B 2000 104 D 4000
103 C 3000
101 A 1000-->
104 D 4000
Answer Posted / arjun
select * from tablename where rowid=1
union
( select * from tablename
intersect
select * from tablename where rowid = ( select max(rowid)
from tablename));
| Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
What are types of exception?
what is table? : Sql dba
Why do we create views in sql?
how to drop an existing view in mysql? : Sql dba
Does inner join remove duplicates?
How can you fetch first 5 characters of the string?
How do you respond to dementia behavior?
Is full outer join same as cross join?
What is a unique key and primary key and foreign key?
Do prepared statements prevent sql injection?
what are all the different normalizations? : Sql dba
how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc
What are operators available in sql?
Is primary key clustered or nonclustered?
Why self join is used in sql?