SQL Plus Columns getting overflowed to next row

The DeptNo column when using SQLPlus in Oracle 11g XE is getting pushed down to the next row, despite having sufficient space in the window in Ubuntu 20.04 Terminal.

SELECT Data with logic created date not greater than

I have three tables with detail structure and data like this : Table TBL_REFERRAL ID CREATED_DATE USER_NAME REFERRAL_CODE ——————————————————— 1 …

Get the last login date for all users in Oracle 11g

We have Oracle 11g so the following query didn’t work. select USERNAME,LAST_LOGIN from dba_users Then I searched and people suggested multiple ways and i got confused. What is the correct way to get …

Passing date to Stored Procedure in Oracle SQL error : ORA-01858

I know this question has been answered previously, and I have tried out the solution given in them without success. I have a stored procedure as below(I have removed non-essential parts) : CREATE OR …

How can I read a very long BLOB column in Oracle?

I want to connect a Node Express API with an Oracle 11g Database which has a table with a BLOB column. I want to read it using a SQL query, but the problem is that the BLOB column can have a very long …

Editing the output (set brackets depending on the quantity retrieved and the semicolon)

Every time that I run my code I obtain one, or two or several rows on a JSON format. I am using Oracle 11g. This is my CODE on SQL Fiddle, you will find all the data there. For example, in this case …

I’m trying to know the country that pays the highest salary from

select last_name, country_name, SUM(salary) from employees e JOIN departments d ON (e.department_id= d.department_id) JOIN locations L ON (d.location_id = L.location_id) JOIN Countries Cc ON (L….

INSERT into statement not working in oracle when using INSERT INTO .. SELECT * FROM

I have vh_emp table whose table structure is(This is empty table): I am taking data from employee table as source table where I wrote some query to match with vh_emp table: SELECT e.emp_id …

ORA-00920: invalid relational operator while using IN operator

I have a table col where i have: select * from offc.col; I returned some data using query by year wise ans dept_id wise: SELECT dept_id, year, Max(marks) marks FROM offc.col …

Strange behavior of Oracle and group by

While analyzing performance of an SQL query in Oracle, I noticed a strange behavior. I noticed that Oracle’s plan behavior changes depending on value used in query. For example here is my table …