() Turn capital
Lower () Turn lowercase
Vt-sql1. Declaring variable syntax: DECLARE @ variable name data typeAssigning values to variables
SET @ variable name = value
SELECT @ Variable name = value
Output variable SELECT @ variable namePS: If you want to output variables, declare variables, variable assignments, and variable output three statements need to be executed together2. Programming statements
Begin...end
If...else
Back to Topv View1. Create
Isolation levels in SQL Server control the locking works between transactions.SQL Server supports the following isolation levels
Read UNCOMMITTED
Read Committed (the default)
Repeatable Read
Serializable
Snapshot
Before I run through each of the these in detail if want to create a new database to run the examples, run the followingSc
Js|server| pull Down
Using ASP nesting Js+sql server to build two-level continuous Drop-down box (1)
With the rapid development of network technology, more and more e-commerce sites have emerged. And in the construction of a powerful E-commerce site often do not have to pro
shown in the following example:
Copy Code code as follows:
DECLARE Custcursor CURSOR
For
SELECT * from Customers
WHERE Cust_email is NULL
Using cursors
Use the Open CURSOR statement to open the cursor and use the FETCH statement to access the cursor data. The fetch indicates which rows to retrieve, where to retrieve them, and where to place them (such as variable names), and here is an
Tags: dex http insert line ble lis search SPL imaThe recent online system suddenly appears to have more than 10 notes, looking at the situation over time, after a few searches. Discover the cause of the problem, through the end and the end of the two sides of the same time, the efficiency of the inquiry to raise more than a few hundred times First of all, the original application of the business logically edit for each page number is fixed to 10 pen, so users can exchange up to 10 of the informa
server| Sample | data
Example of tree data processing in SQL Server 2005--Create test dataif exists (SELECT * from dbo.sysobjects WHERE id = object_id (n ' [TB] ') and OBJECTPROPERTY (ID, n ' isusertable ') = 1)drop table [TB]Go
--Sample dataCREATE TABLE [TB] ([id] int PRIMARY key,[pid] int,name nvarchar (20))INSERT [T
This article illustrates the function and usage of SQL Server to implement Split function split string. Share to everyone for your reference, specific as follows:
/*
function Name: F_splittonvarchar function
: To realize the function of Split function
update record:
design idea: A string that combines nvarchar type characters, Separate into a list of nvarchar types/
CREATE FUNCTION [dbo].[ F_splittonva
-expression 2)A string that intercepts an integer expression 2 length from an integer expression in a string of 2 bitsExample: Select substring (' Tracyleebaihe ', 3,2)--return:ac12, lower (string expression) and upper (string expression)The former converts the uppercase letters in the string to lowercase, the latter vice versa. If the string does not containLetter, blame return to original stringExample: Select lower (' Pinball tttt Pinball ')--return: Bomb TTTT Pinball HallExample: Select Uppe
Try this tool to configure yourself today. First, a database is established in the database, named TestDB, and a new SQL Server login name (TESTDB) is created and the default database TestDB TestDB is specified. And then it starts to be configured.
The configuration process is referred to theaspnet_regsql.exe tool registration database , but when you select the server
Specific steps to implement automatic backups in a SQL Server 2005 database:In the toolbox on the left (if not, press ctrl+alt+x), drag the Backup database task to the yellow area in the middle
Double-click the dragged out of this task, the design properties will appear in the window
In the database, select the database you want to back up, and then set up the backup to there, and set the file name of the
When we are programming with Excel, we often need to use a database.
So how do you connect the database and then read the data from the database?
VBA connects to an instance of SQL SERVER database:
Dim strconn As String, strSQL as String Dim conn as ADODB. Connection Dim DS as ADODB. Recordset Dim col as Integer ' connect the database string strconn = ' Provider=SQLOLEDB.1; Persist Security info=true
I heard that Ms SQL 2005 with the report function, so I tested a bit, but also relatively easy to use, so I recorded a stored procedure to write a report example. Since there is no voice in the test process, I am here to explain.
The stored procedures used are as follows (in the video I finally changed the stored procedure):
The database used is the Northwind database for Ms
Number _ input Clerk= @typistId END IF @flag = 1 BEGIN INSERT intoHome Settlement (demolition item number, family number, can purchase the business room area, can purchase the housing area)VALUES(@projectId,@familyId,@priorityBusinessArea,@priorityHousingArea) END --Add a family member INSERT intofamily member (family number, name, gender, ID number, work unit, work address, account location, account nature, residence address, mobile number, remark, appellati
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.