CopyCodeThe Code is as follows: @ echo off
Set/P Choi = start the database and stop the database [B, E]?
If/I % Choi % equ B goto beginserver
If/I % Choi % equ e goto endserver
: Beginserver
Net start MSSQLServer
Goto end1
: Endserver
Net
The following describes how to create an sqlserver Database
Code Template, and a template for creating a table. During development, you can copy it and change it directly.
Hope you can help me! Copy code The Code is as follows: use [Master]GoIf
Pattern Matching in search criteria
The like keyword searches for the string, date, or time value that matches the specified pattern. The like keyword uses the regular expression to include the pattern to be matched by the value. The mode contains
In this case, the time for issuing the ticket will be 10 minutes-> 20 seconds. This is amazing.
Now, let's go to the demo, test, and change it to a method test that we generally use. nnd is really fast.
Paste my demo: sqlbulkcopy.rar here
CopyCode
1. Constants
A constant is a hexadecimal or numeric constant that contains text and numbers. A String constant contains one or more characters in the single quotation mark ('') or double quotation mark (" ") Character Set.
If you want to use a
Data Type
Type
Description
Bit
Integer
The BIT data type is an integer, and its value can only be 0, 1, or null. This data type is used to store data with only two possible values, such as yes, no, true, or fa lse, on,
Solution:
It is not possible to directly attach or attach data. It is certainly no problem to use script + to export data.
Steps for transferring sql2005 to SQL2000
1. Generate database scripts for version 2000 Manger studio in sql2005-- Open "
The specific website is not saved, but I am used to it.
Code Remember to save the method and paste it now. I hope the original author will be considerate.
Copy code The Code is as follows: --- the first day of the first month of last month
Select
That's all.
The stored procedure calls mup_geta (I erased the project-related names)
You can view objects dependent on mup_geta through the functions provided by sqlserver graphics manager.
The result is a bit confusing. I didn't list
A. Use declare
The following example uses a local variable named @ find to retrieve information of all authors whose names start with a ring.
CopyCode The Code is as follows: Use pubs
Declare @ find varchar (30)
Set @ find = 'ring %'
Select
1. A trigger is a special stored procedure. It cannot be explicitly called. Instead, it is automatically activated when a record is inserted, updated, or deleted into the table. Therefore, triggers can be used to implement complex integrity
The following are my statistical solutions:
Solution 1 (recursive ):Simple Table Structure:Categoryid int (4 ),Categoryname nvarchar (50 ),Parentid int (4 ),Depth int (4)In this way, the parent directory of parentid is obtained recursively based
When writing a statement today, execute it in the query analyzer.
It takes less than 10 s to use another method, which is less than 1 s. The colleague said that it is because of the SQL sentence execution sequence. I have seen a few moments before
I
Modify:
Copy codeThe Code is as follows: declare proccur cursor
For
Select [name] from sysobjects where name like 'Foods _ %'
Declare @ procname varchar (100)
Declare @ temp varchar (100)
Open proccur
Fetch next from proccur into @ procname
While (@
Clustered index: physical storage is sorted by indexNon-clustered index: physical storage is not sorted by indexAdvantages and disadvantagesClustered index: the data insertion speed is slow (the time is spent on the "sort of physical storage", that
By default, SQL Server saves seven ErrorLog files named:
ErrorLog
ErrorLog.1
ErrorLog.2
ErrorLog.3
ErrorLog.4
ErrorLog.5
ErrorLog.6
In apacs OS 6.1, The ErrorLog file is saved in the c: \ Program Files \ Microsoft SQL Server \ MSSQL $ WINCC \
SET instead of SELECT is recommended for SQL Server.When the expression returns a value and assigns a value to a variable, the SET method is recommended.The following table lists the differences between SET and SELECT. Pay special attention to the
Copy codeThe Code is as follows: -- Method 1
If exists (select * from dbo. sysobjects where id = object_id (n' [dbo]. [USP_ProcedureWithTransaction_Demo] ') and OBJECTPROPERTY (id, n' IsProcedure') = 1)
Drop procedure [dbo].
Copy codeThe Code is as follows:/* 01.
02. SQL xml entry:
03. -- by jinjazz
04. -- http://blog.csdn.net/jinjazz
05.
06. 1. xml: Recognition of elements, attributes, and values
07.
. Xpath: Addressing language, similar to windows Directory Search (if
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.