The stored procedure is as follows:
Create procedure testsp@ ID intAsReturn @ ErrorGo
Online examples use SQL objects to transmit parameters, so they are written in the same format.CodeThe result cannot contain parameters. The Code is as follows:
A transaction is a single unit of work. If a transaction succeeds, all data modifications made in the transaction will be committed and become a permanent component of the database. If the transaction encounters an error and must be canceled or
go Create Function [DBO]. [split] ( @ sourcesql varchar (max), @ strseprate varchar (10) ) Returns @ temp table (line varchar (max )) as begin declare @ I int set @ sourcesql = rtrim (ltrim (@ sourcesql )) set @ I = charindex (@ strseprate,
Set nocount onDeclare @ procedure sysname -- used to obtain the stored procedure name set, @ STR nvarchar (200) -- set fixed variables for ease of use, @ Str1 nvarchar (200) -- saves the execution string for cyclic operations, @ Username nvarchar (30
Use SQL statements to delete a specified recordDelete a specified record using the delete statement in an SQL statement.The delete statement syntax is as follows:Delete from [where ]Parameters:Table Name: name of the data table.Where: Specifies the
A Foreign ForumArticle, First add to favorites and then try again when you are free
If you are familiar with these two tools, there is no problem ~~~
How to Use fiddler and SQL Server Profiler to look for database performance bottlenecksPosted
In databases, strings in certain formats are often used for parsing. I have previously written a similar method, and today I have written another one, and I will share it with you.
Create Function [DBO]. [func_splitstringtotable] (-- string to be
When SQL Server Management studio is connected using Windows, select windows and SQL for "security" in "attribute" of the real column for verification, restart the SQL Server, create a new query, and execute the followingCode
(Several different
Databases in SQL Server are composed of one or more data files and one or more transaction log files.
Data Files mainly store database data, including the database content structure, data pages, and index pages. So what is transaction log? It is
A trigger is used to perform certain actions when adding, modifying, or migrating data to a specified table. SQL Server 2005 also provides database-level triggers, but here I only describe table-level triggers. Because the trigger starts a hidden
1. nested loop join (nested loop join)
Algorithm:
The idea is quite simple and straightforward: For each tuples in relation R, R compares them with every tuples in relation s in the join condition field and filters out the qualified tuples. The
Row_number (): indicates the number of rows in the overall result set, and Adds 1 in sequence.
Rank (): group (or not group) first, then each group of rows indicates the serial number, and Add 1 in sequence. If the value of the sequence in this
How to quickly master SQL Server lock concepts
Author: anonymous name
I. Why should I introduce locks?
When multiple users concurrently perform database operations, the following data inconsistency occurs:
◆ Update loss
A and B read and modify the
-- Create the create function [DBO] to take the first letter of a Chinese character (the third edition). [f_getpy_v3] (@ Col varchar (1000) returns varchar (1000) as begin declare @ Cyc int, @ Len int, @ SQL varchar (1000), @ char varbinary (20)
When we mention the number of data entries in a single table, we will think of select count (*) from tablename
What if we want to get the number of all tables in the database? Let's look at several of the most common methods:
-- Method 1 if exists (
This blog introduces some classes in ADO. Net, which are not very familiar with coding. Therefore, make a summary!
Oledbconnection class: provides a data source link
Parameters
Description
Provider
Specified oledb provider
Later I found that this part was not completed, so I made a supplement to the SELECT statement-nested query and join query.
SQL Server statements are classified into three types:
Data Definition Language (DDL): used to define the data structure.
When I started sqlserver2000 login in SQL Server mode today, I suddenly reported error 18456. I tried a lot of methods on the Internet and finally solved the problem by using the following methods. I changed the sa Login Password, however, the error
SQL Server Lock Mechanism
All SQL Server activities produce locks. The smaller the lock unit, the more concurrent processing capability the higher the management lock overhead. It is difficult for SQL Server to find a balance between concurrency and
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service