SQL- query to find out the distinct values from two tables
There are two tables tabA1 tabA2 NUM CODE CODE ITEMS 1001 A A paper 1002 B C milk 1003 C E paper 1004 A 1005 B 1006 B output should…
There are two tables tabA1 tabA2 NUM CODE CODE ITEMS 1001 A A paper 1002 B C milk 1003 C E paper 1004 A 1005 B 1006 B output should…
INPUT OUTPUT Should be output should like this o is group1,1 is group2,2 is group 3... Final Query select min(c) min_range,max(c) max_range from t_seq group by c-rownum order by 1
The query Output Another method select utl_i18n.raw_to_char( utl_raw.reverse( utl_i18n.string_to_raw(' nice blog '))) as reverse_string from dual; output Using reverse() select reverse ('welcome') from dual; output
First and last records of table1 into table2 has to be single rowSecond and last but second row of table1 into table2 input OUTPUT should be Employee1 data insert into…
I retrieve data from this demo table (e62) The Query Output
Sample Table CREATE TABLE Testdata ( SomeID INT, OtherID INT, String VARCHAR(MAX) ) INSERT Testdata SELECT 1, 9, '18,20,22' INSERT Testdata SELECT 2, 8, '17,19' INSERT Testdata SELECT 3, 7,…
Retrieve data from emp table Emp table find out the last last 4 rows inserted
If I have a table with a column that contains fullnames such as : select * from name table; name table IDNAME101sachin ramesh tendulkar102virat koholi103rabi sastri104thakur ramesh kar105pratap ram sek…
Retrieve data from emp table The Query select to_char(hiredate,'yyyy'),count(*) from emp group by to_char(hiredate,'yyyy') having count(*)>=(select max(count(*)) from emp group by to_char(hiredate,'yyyy')) ;