Want to know insert into temp table from stored procedure? we have a huge selection of insert into temp table from stored procedure information on alibabacloud.com
SqlPager Stored Procedures
Copy Code code as follows:
ALTER proc [dbo]. [SqlPager]
(
@tblName varchar (255),--Table name (Note: You can link multiple tables)
@strGetFields varchar (1000) = ' * ',--columns to be returned
@OrderfldName varchar (255) = ',--sorted field name
@PageSize int = 10,--page size
@PageIndex int = 1,--page number
@doCount int = 1 output,--number of records queried
@
SQL Statement implementation:SELECT COUNT (*) from INFORMATION_SCHEMA. ' TABLES ' WHERE table_name= ' youtablename ';In the WHERE clause, the table name is a string type, and the single quotation mark is added.In the MySQL stored procedureFunction implementation:CREATE definer = ' root ' @ ' localhost ' FUNCTION ' tableexists ' (' tname ' varchar ()) RETURNS tinyint (4) Begindeclare Tableexists TINYINT DEFA
Tags: add case from ALTER TABLE name use ORA function name kill1. If the function is locked, then there must be a process using the functionSelect b.sid,b.serial# from Dba_ddl_locks A, v$session b Where a.session_id = b.sid and A.name = ' function name or table name ';2. Kill processes using commands in OracleAlter system kill session ' sid,serial# ';3. If you encounter a situation that cannot be killed in
Copy Code code as follows:
ALTER PROCEDURE [dbo]. [Sp_add_jurisdiction]
@CTableName varchar (20),--current table to be deleted, new
@filedkeyValue varchar (20),--value of the field to be deleted
@filedName varchar (20),--Name of the field to be deleted
@filedNameAdd1 varchar (20),--New field name 1
@filedNameAdd2 varchar (20),--New field name 2
@sql varchar (6000)--new value-added strings, such a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.