Alibabacloud.com offers a wide variety of articles about select stored procedure into temp table, easily find your select stored procedure into temp table information here online.
【Recommendation]SQL Server One of the uncommon applications
Obtains the basic information, Field List, and stored procedure parameter list of a table.
-- Establish a personal brand through knowledge sharing.
1. obtain basic table information
Select [
It is generally used for reports. premise: some of the reports are queried from some tables, while others are obtained through various computations. In this case, this stored procedure is available. It is purely a personal record and is not for everyone to learn.
As follows:
Use [Changyuan]
Go
/***** Object: storedprocedure [DBO]. [sp_adv_qy_jpdata_select_bydates] script Date: 05/19/2013 21:52:49 **
An error occurred while executing a stored procedure: ORA-01031: insufficientprivileges. Debug the stored procedure and find that an error occurs when the stored procedure runs to create a tab
Write the stored procedure for the first time, write well to suppress flexion.set @c_db := (select database());drop procedure if exists alter_tables_engine;delimiter //create procedure alter_tables_engine() begin declare db varchar(64); declare done boolean default 0;
Tags: des style http color io java ar strong data2nd part Database SQL languagePreservation of important table information in database stored procedure and related suggestions1. Saving important table information in the stored procedureIn very many
Tags: date time traffic from the name DDD package whileGeneral traffic is larger than the Web site, and the request log table is created independently of one table per day. The business needs to add a new column for each table, and for half a day, write a stored procedure li
Cursor traversal data table for MySQL stored procedureToday write a MySQL stored procedures, according to their own needs to traverse a data table, because the stored procedures used not much, syntax is not very familiar with the stored
Tags: mysq l database stored procedure dynamic table prepare
PREPARE statement_name from sql_text/* definition */
Execute statement_name [USING variable [, variable ...]]/* Execute preprocessing statement */
deallocate PREPARE statement_name/* Delete definition */
This is used in my project, as a reference to use:DELIMITER $ $DROP
Label:Original situation:A server table AServer B also has a table aThere is a stored procedure on server B to insert the local head table into the a server table.After the change:A field inserttime is added to the a server table,
The insert SQL statement used to export the joined table in the stored PROCEDURE. To facilitate the data migration of the three associated tables, export the data into an insert SQL statement. By the way, let's take a look at PROCEDURE.Usage TABLE Structure: SQL code -- PAGE CREATE
The data in the ORACLE Stored Procedure table is overwritten and restored. The old Stored Procedure overwrites the new stored procedure. As a result, all the previously used functions a
Tags: io ar using for data on CTI as database--SQL SERVER determines if there is a trigger, stored procedure--Determine the storage process and delete if it existsIF (EXISTS (SELECT * from sysobjects WHERE name= ' procedurename ' and type= ' P '))DROP PROCEDURE procedurename--Judgment trigger, if present deleteIF (EXIS
Code directly. This is useful to everyone!Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
-- Determine whether [testdb] exists
If exists (select 1 from Master .. sysdatabases where name = 'testdb ')
Print 'testdb exist'
Else
Print 'testdb does not exist'
-- Determine whether the table [testtb] existsIf exists (se
For websites with a large access volume, the request log table adds a new column for each table to create a business independently for each table every day. after a long time, the stored procedure is as follows: the log table stru
CREATE TABLE Egmas_count_data(Times date NOT NULL,COUNT number (+) is not NULL,System_name VARCHAR2 (+) NOT NULL,Operation_index VARCHAR2 (+) NOT NULL);--ADD comments to the columnsComment on column egmas_count_data. Timesis ' date ';Comment on column egmas_count_data. COUNTis ' statistic ';Comment on column egmas_count_data. System_nameIs ' system code ';Comment on column egmas_count_data. Operation_indexIs ' Business operation indicator name ';
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.