Type exists in 6.0, and xtype exists in 7.0:
TypeObject type. It can be one of the following values:C = check ConstraintsD = default value or default ConstraintF = foreign key constraintFn = scalar functionIf = embedded table functionsK = primary
Table data:
ID name
1
2 B
3 C
Stored Procedure:
Set ansi_nulls on
Set quoted_identifier on
Go
Alter procedure [DBO]. [test1]-- @ ID varchar (50) OutputAs
Declare @ ID varchar (50) -- set the intermediate variableDeclare vari_cursor
It is very easy to use the database management tool to directly visualize a column in the SQL Server database, but what if you want to use an SQL script? You may say it's very simple to use it directly.
Alter table [name of the table where the
Key points:
1.The Go clause is used to separate the batch processing. The range of local variables is limited to one batch. After the go clause, the previously defined variables cannot be used.
2.Create Database studentmanager and generate the
I have always used the Enterprise Manager to operate SQL. Yesterday I helped a friend deploy a website and rented a foreign VPs host. After logging on, I only saw the SQL icon running normally, the Enterprise Manager and the query analyzer do not
Sometimes you like your books. -- Feng Tang
1. The dead-lock event occurs in sqlserver, mainly because two threads occupy the exclusive lock of a resource respectively, and then the two threads obtain the exclusive lock of the resources owned by the
SQL Server has several processing operations on the result set. It is worth explaining.
1. Union (Union, Union all)
This is simple. It combines two result sets horizontally. For example
Select * from
Union
Select * from B
[Note] Union deletes
1) exception: ierrorinfo. getdescription failed because of e_fail (0x80004005.The main cause of this problem is that the SQL statement executed on Access contains components not supported by access (such as functions in SQL Server ).
2) unable to
--- Table field name --
Select B. [name] As 'column name', C. [name] As 'data type', B. length as 'length', D. value as 'description' 'from sysobjectsLeft join syscolumns B on A. [ID] = B. [ID]Left join policypes C on B. xtype = C. xtype and B.
'Call method: dbbackup. asp? Dbname = Database Name
'Only the SQL database of the server where IIS is located can be backed up (Remote SQL database cannot be backed up ).
'Eric 2009.12.7
Const conf_dbhost = "(local )"
Const conf_dbuser = "sa"
This article discusses how to import MySQL databases to SQL Server. First, you need to install both databases and then perform the following steps.
1. Install ODBC driver for MySQL
1. Download MySQL ODBC ctor, download:
/* -- Paging program implemented by stored procedures
Displays page X of the specified table, view, and query result.
In the case of primary keys or ID columns in the table, query the data directly from the original table. In other cases, use the
In the past, due to the high Memory price, the general configuration of memory is not much, of course, more than 4G is not enough. The current server, the configuration of more than 4G is much, in the configuration of SQL
After the database server,
The access and SQL server data types are different. These types are useful when you use scripts to define data.
Microsoft Access Data Type
SQL Server Data Type
Yes/No
Bit
Smallint (byte type)
Tinyint
Create Function f_convert (@ STR nvarchar (4000), -- string to be converted @ flag bit -- Conversion flag, 0 to halfwidth, 1 to fullwidth) returns nvarchar (4000) as begin declare @ Pat nvarchar (8), @ Step int, @ I int, @ SPC int if @ flag = 0
1: returnvalue can only return data such as 0, 1,-1, with great limitations. In the stored procedure, the output parameter can return various types of data, which is flexible and convenient.
Returnvalue is used to return the error code, and output
During project development, we should be familiar with database transactions, but how can we use transactions well?
I would like to share some of the following notes with you:
1. For the business to be processed, the transaction operation time
/* Configure /*------------------------------------------------------------------------------------
/* You are welcome to reprint the statement. Please keep the information in this statement
/* Author: Weng Yan enhydraboy@yahoo.com.cn
/* Configure /*
From: http://lwlzyjl.cnblogs.com/
Method 1:
Create Table # tabtmp (id int)
Insert # tabtmp execute ('select ID from '+ @ tablename)
Declare curone cursor
Select ID from # tabtmp
Open curone
Fetch next from curone into @ ID
Method 2:Exec ('
Declare
Release a project for the customer, which is based on the SQL Server database. It may be difficult to install the SQL server during deployment, and it is not a genuine version. I started to want to install an MSDE. Later I thought it only supported 2
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.