Skip to content

Tag: oracle

How to fetch required data using single query in sql developer

I have a subject table that has subject_id column. In the table I have one row that has subject_id null other than that subject_id has a distinct value. I am looking for single query I can fetch the data on basis of subject_id. If there is no data found w.r.t x than it should return the row with subject_id =

How to show data that’s not in a table. SQL ORACLE

I’ve a data base with two tables. I need a SQL query which show “The players who have not won any game”. I tried but I don’t know even how to begin. Thank you Answer You need all the rows from players that don’t have corresponding rows in wins. For this you need a left join, filt…

Oracle: WITH-clause querying two tables

Using an Oracle database, I have two tables: I am supposed to find – using the WITH-clause – all the employees who currently work in the same department where they started to work (hire_date = start_date and same department_id). I easily got the right result using a JOIN in the subquery: (Right) O…

Get id with same value

I have a table as below: May I know how can I get the studentNo who have exactly same course as student s001? Many thanks. Answer You want to count the number of courses for each student and then join the table to itself for different students taking the same course with the same total number of courses and t…

delete data only between may 6 and may 18, 2022

I have a table with CLIENT_CONTACT data, where there is call data from 2020 to today. How can I delete data only between May 6 and May 18, 2022, did I write correctly? Answer did I write correctly? Maybe…. in Oracle, a DATE is a binary data type consisting of 7 bytes representing century, year-of-centur…