我正试图将数据从一个表格移至另一个已经包含数据的表格。
我在网上发现,最好的办法是用“公平与和解”这一呼吁:
DELETE FROM table_1
OUTPUT DELETED.*
INTO table_2;
然而,我收到了:
5. 结构汇编错误:第7位出乎意料的行文错误线2
我正在斯诺瓦克这样做。
它没有发挥作用的原因吗?
我正试图将数据从一个表格移至另一个已经包含数据的表格。
我在网上发现,最好的办法是用“公平与和解”这一呼吁:
DELETE FROM table_1
OUTPUT DELETED.*
INTO table_2;
然而,我收到了:
5. 结构汇编错误:第7位出乎意料的行文错误线2
我正在斯诺瓦克这样做。
它没有发挥作用的原因吗?
DELETE FROM table_1
OUTPUT DELETED.*
INTO table_2";
某些方言支持。
DELETE FROM table_1
RETURNING *;
DELETE FROM <table_name>
[ USING <additional_table_or_query> [, <additional_table_or_query> ] ]
[ WHERE <condition> ]
相当于<代码>的粗略(非组别) OUT/编码:
--CREATE TABLE table_2 AS
INSERT INTO table_2(col1, ...)
SELECT col1, ...
FROM table_1
WHERE <cond>;
DELETE FROM table_1
WHERE <cond>;
您可从删除的表格中提炼和INSERT,因为它是:BEFORE,删除(使用时间旅行),永远不会遗漏任何行文。
(c) 建立:
create or replace table t1(id, val) as
select * from values
(1,10),
(1,11),
(1,12),
(2,20),
(2,21);
create or replace table t2 like t1;
quick check (which we will reuse):
select t1 as tab, * from t1
union all
select t2 , * from t2;
现在,两个指挥区:
-- BLOCK START
delete from t1;
insert into t2 select * from t1 before(STATEMENT => LAST_QUERY_ID());
-- BLOCK END
这些会议将举行同一届会议/与工作挂钩。
然后再次检查:
现在,如果这两个指挥部之间出现魔s,就在另一个侧面上(我将使用另一个工作表)。
insert into t1
select * from values
(3,30),
(3,31);
在第二支部队指挥系统之后,我们检查:
nice and thread safe.
$db_user="root"; $db_host="localhost"; $db_password="root"; $db_name = "fayer"; $conn = mysqli_connect($db_host,$db_user,$db_password,$db_name) or die ("couldn t connect to server"); // perform query ...
I am in the early stages of developing a database-driven system and the largest part of the system revolves around an inheritance type of relationship. There is a parent entity with about 10 columns ...
I m writing a Java web app in my free time to learn more about development. I m using the Stripes framework and eventually intend to use hibernate and MySQL For the moment, whilst creating the pages ...
Does anybody know if it is possible to move some (not all) users from one ASP.NET membership database to another? (for the purposes of migrating some users to another database on another machine, but ...
Is it because of size? By the way, what is the limit of the size?
I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...
For example, I have a table, and there is a column named Tags . I want to know if value programming exists in this column. How can I do this in ADO.NET? I did this: OleDbCommand cmd = new ...
I m trying to migrate one of my PHP projects to Doctrine. I ve never used it before so there are a few things I don t understand. In my current code, I have a class similar to this: class ...