Skip to content
Advertisement

Tag: oracle

Update statement with inner join on Oracle ORA-01427

ORA-01427: single-row subquery returns more than one row ORA-06512: at “SYS.DBMS_SQL”, line 1721 I need to do update with inner join in ORACLE Answer The script you provided above is going to update all rows in the table because you do not have a where clause. If you really want to update all rows in the table, then this should

Why are these 2 queries giving different outputs?

Query no 1:- The Query 1 gives me the following output:- Query no 2:- The Query 2 gives me the following output:- Answer Summary: The AND operator has higher precedence than the OR operator. To fix it, use brackets around the OR expression. AND has higher precedence than OR so your first query is the equivalent of (with added brackets

How to find a salary which does not end with Zero

I have been trying to write a query where I need to find a salary which does not end with ZERO My Query : select salary from employees where REGEXP_LIKE (Salary, ‘^(1|2|3|4|5|6|7|8|9)$’); Answer I would just use the modulus here: By definition, the modulus 10 returns the single (final) digit in the salary. Going this route avoids a costly conversion

Advertisement