SQL

How to Resolve ORA-00903: invalid table name

Posted on
In this post, I will introduce 3 main error patterns about ORA-00903, they are: Violating Naming Rules Missing Quotes Incorrect Syntax ORA-00903 due to Violating Naming Rules Without complying with database object naming rules, we can’t create a table with unusual strings in normal way. Let’s see some cases that throw ORA-00903. First of all, […]
MySQL

A Pitfall of INSERT IGNORE

Posted on
INSERT IGNORE is primarily used for preventing statements stopped from unique constraint violations by ignoring current duplicated rows. That is to say, the duplicated rows will not be inserted into the table.But actually, INSERT IGNORE will try everything it can do to insert the table without errors during statement execution. Let’s see an example. Suppose […]
MySQL

How to Batch INSERT INTO One Table from Another

Posted on
MySQL does support batch insert into one table from another by the technique of subquery.In this case, we’d like to move records that are more than 1 year old from a contemporary table orders to a historical table old_orders, which can make queries on orders faster than normal.mysql> insert into old_orders (id, total_price, purchase_datetime) select […]