Automation generation of stored procedures in the database (generated a library all stored procedures)

zhaozj2021-02-16  137

Take a detailed thing below to see something inside my collection

Declare @tablename VARCHAR (256)

Declare Craltable Cursor for select name from sysobjects where type = 'u' and name <> DTPROPERTIES '

Open Cralltable

Fetch next from cranetable @tablename

WHILE (@@ FETCH_STATUS = 0) BEGIN EXEC pr__SYS_MakeSelectRecordProc @tableName, 1 EXEC pr__SYS_MakeUpdateRecordProc @tableName, 1 EXEC pr__SYS_MakeInsertRecordProc @tableName, 1 EXEC pr__SYS_MakeDeleteRecordProc @tableName, 1 FETCH NEXT FROM crAllTable INTO @tableNameEND

Close CralltableDeallocate Craltable

转载请注明原文地址:https://www.9cbs.com/read-8403.html

New Post(0)