In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how SQL Server remotely updates the stored procedure of the target table data, the article introduces in great detail, has a certain reference value, interested friends must read!
The stored procedure for remotely updating target database data is suitable for updating databases with consistent column names, primary keys of Int type, and remote links.
USE [Table]-- switch to the source table GO/* Object: StoredProcedure [dbo]. [proc_DataUpdate] Script Date: 15:08:56 on 2018-5-4 * / SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =-- Author:-- Create date:-- Description:-- = CREATE PROCEDURE [dbo]. [proc_DataUpdate] @ TargetInstance nvarchar (max), @ TargetDBName nvarchar (max), @ TargetUID nvarchar (max), @ TargetPWD nvarchar (max), @ LocalDBName nvarchar (max) @ PK_ID nvarchar (max),-- Primary key column (must be numeric) @ Column nvarchar (max),-- Update column name collection @ ExecSize int-- quantity per execution ASdeclare @ sql nvarchar (max), @ NumMax int=0,@NumMin int=0,@MaxID int BEGIN-- SET NOCOUNT ON added to prevent extra result sets from-- interfering with SELECT statements.-- SET NOCOUNT ON -- Open the comment but do not show the execution process. Speed up begin try-- take the maximum value set @ sql = 'select @ MaxID=MAX (' + @ PK_ID+') from'+ @ LocalDBName; exec sp_executesql @ sql,N'@MaxID int out',@MaxID out-- Loop while (@ NumMax)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.