[英]SQL-How to insert one value from one table to another but the data in another table should remain the same
I have two simple tables: 我有两个简单的表:
Let's say bazaa contains 1 ime and 1 prezime and bazab contains 2 ime and 2 prezime. 假设bazaa包含1 ime和1 prezime,而bazab包含2 ime和2 prezime。
I want to insert values into bazaa and those values should also be inserted into bazab but it shouldn't delete anything or mess up the positions of rows. 我想将值插入bazaa,并且这些值也应插入bazab,但它不应删除任何内容或弄乱行的位置。
I tried with some triggers from answers on other questions but it doesn't work. 我尝试了其他问题答案的一些触发因素,但没有用。
Any help would be much appreciated. 任何帮助将非常感激。 Thanks.
谢谢。
尝试这个
Insert into bazab select * from bazaa;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.