Skip to content

I want to fetch 2 records with same id

This is my user table and i want to fetch 2 rows in descending using user_id. I want output like. Thanks in advance Answer I think you strictly need an ANCIer approach. You should try below co-related sub query – Fiddle.

SQL decode column value to another column

I am using PL/SQL 12. I want to decode a column value to match another column value. I take the highest value of the the columns SP_RANK and MOODY_RANK and call it RANK. I want this column to instead …

Create database user with DDL in DB2

I am trying to create a user using DDL in DB2. I tried this: CREATE USER ‘test_user’ IDENTIFIED BY ‘password’; and I got this error message: An unexpected token “‘test_user’ IDENTIFIED BY ‘…