两个数据库表数据实时同步
欢迎进入Windows社区论坛,与300万技术人员互动交流 >>进入 /****** Object: Trigger [dbo].[TR_C0T14] Script Date: 11/01/2011 13:21:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ―― ===========================================
欢迎进入Windows社区论坛,与300万技术人员互动交流 >>进入
/****** Object: Trigger [dbo].[TR_C0T14] Script Date: 11/01/2011 13:21:04 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
―― =============================================―― Author:
――DROP TRIGGER TR_C0T14
CREATE TRIGGER [dbo].[TR_C0T14] ON [dbo].[C0T14] FOR INSERT,UPDATE,DELETE AS BEGIN IF NOT EXISTS(SELECT * FROM deleted)
BEGIN /*插入*/ INSERT INTO leamon_test……C0T14(RATINGID,[BROKER],BROKERRATE,SFRATE,SFVALUE,F_OP1,F_OP2,F_OPC1,F_OPC2,F_9997,f_9998)
SELECT RATINGID,[BROKER],BROKERRATE,SFRATE,SFVALUE,F_OP1,F_OP2,F_OPC1,F_OPC2,F_9997,f_9998 FROM inserted WHERE NOT EXISTS (SELECT TOP 1 * FROM leamon_test……C0T14 WHERE inserted.RATINGID = leamon_test……C0T14.RATINGID)
END /*删除*/ ELSE IF NOT EXISTS(SELECT * FROM inserted)
DELETE FROM leamon_test……C0T14 WHERE RATINGID IN (SELECT RATINGID FROM deleted)
/*更新*/ ELSE BEGIN UPDATE leamon_test……C0T14 SET RATINGID = inserted.RATINGID,[BROKER] = inserted.[BROKER],BROKERRATE = inserted.BROKERRATE,SFRATE = inserted.SFRATE,SFVALUE = inserted.SFVALUE,F_OP1 = inserted.F_OP1,F_OP2 = inserted.F_OP2,F_OPC1 = inserted.F_OPC1,F_OPC2 = inserted.F_OPC2,F_9997 = inserted.F_9997,f_9998 = inserted.f_9998 FROM inserted WHERE inserted.RATINGID = leamon_test……C0T14.RATINGID AND (inserted.[BROKER] leamon_test……C0T14.[BROKER] OR inserted.BROKERRATE leamon_test……C0T14.BROKERRATE OR inserted.SFRATE leamon_test……C0T14.SFRATE OR inserted.SFVALUE leamon_test……C0T14.SFVALUE OR inserted.F_OP1 leamon_test……C0T14.F_OP1 OR inserted.F_OP2 leamon_test……C0T14.F_OP2 OR inserted.F_OPC1 leamon_test……C0T14.F_OPC1 OR inserted.F_OPC2 leamon_test……C0T14.F_OPC2 OR inserted.F_9997 leamon_test……C0T14.F_9997 OR inserted.f_9998 leamon_test……C0T14.f_9998)
END

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

How to restart the Redis service in different operating systems: Linux/macOS: Use the systemctl command (systemctl restart redis-server) or the service command (service redis-server restart). Windows: Use the services.msc tool (enter "services.msc" in the Run dialog box and press Enter) and right-click the "Redis" service and select "Restart".
