Query

How to Compare Two Tables Definition

Posted on
Compare Two Tables’ Column Names Whenever you concern the differences between two tables’ definition, you can use queries to compare the columns of two tables. For example, a table named EMPLOYEES_2 which is very similar with the original table EMPLOYEES. And we’d like to know the differences in columns. We can compare both tables like […]
Query

How to Resolve ORA-00913: too many values

Posted on
ORA-00913: too many values
ORA-00913 When SELECT Let’s see a SQL statement containing a subquery that can reproduce ORA-00913 for an example. SQL> select * from employees where department_id in (select department_id, manager_id from departments where location_id = 1700); select * from employees where department_id in (select department_id, manager_id from departments where location_id = 1700)         […]
Query

How Oracle Limit Rows Returned

Posted on
Oracle Limit Rows In MySQL, we use LIMIT clause to limit number of rows returned in SELECT SQL statements. But in Oracle, we may need to do more works to limit our target rows. For comparing the expected result, we selected all data and sorted by the third column like the following: SQL> conn hr/hr; […]