¸ü¸ÄSQL 2005µÄµÇ½·½Ê½
Èç¹ûÄãµÄÉí·ÝÑéÖ¤·½Ê½ÎªWindows¼¯³ÉÉí·ÝÑéÖ¤¸ü¸ÄΪ»ìºÏ·½Ê½µÄÉí·ÝÑéÖ¤£¬ÐèÒªÔÚSQL Server Configuration ManagementÖУ¬°ÑTCP/IPµÄ»î¶¯ÆôÓã¬Ò²¾ÍÊǵÚÒ»¸öÑ¡ÔñµÄµØ·½£¬Ñ¡ÔñÆôÓᣲ¢ÇÒʹÓü¯³ÉÉí·ÝÑéÖ¤·½Ê½µÇ¼ºó£¬ÔÚÊý¾Ý¿â·þÎñÆ÷ÉÏÑ¡ÔñÊôÐÔ£¬°Ñ°²È«ÐÔϵÄWINDOWSģʽ¸ÄΪSQLÓëWINDOWSģʽ
Ïà¹ØÎĵµ£º
drop table father;
create table father(
id int identity(1,1) primary key,
name varchar(20) not null,
age int not null
)
drop table mother;
create table mother(
id int identity(1,1),
name varchar(20) not null,
age int not null,
husban ......
ÅжÏÊý¾Ý¿âÀàÐÍ
(select count(*) fromsysobjects)>0 //sqlÊý¾Ý¿â
(select count(*) from msysobjects)>0 //accessÊý¾Ý¿â
µÃµ½SqlÓû§Ãû
user>0
Conversion failed when converting the nvarchar value 'dbo' to data type int.
ÖØ¹¹SQLÓï¾ä
ÕûÊýÐÍ
(A) ID=49 ID=49 And [ ²éѯÌõ¼þ] £¬¼´Ê ......
×¢ÊÍ:Ö»Êʺϵ¥±íµ¥ÁÐÊý¾Ý,
create database test
go
use test
go
create table users
(
:id int identity(1,1) primary key not null,
:name nvarchar(20)
)
go
create proc sp_Inserts
@Names nvarchar(4000)
as
declare @Name nvarchar(20),@ErrorSum int
:set @ErrorSum = 0
:begin tra ......
¾Û¼¯Ë÷Òý²»½ö°üº¬Ë÷ÒýµÄkeyÖµ£¬»¹°üº¬±íÊý¾Ý£»
·Ç¾Û¼¯Ë÷ÒýÖ»°üº¬Ë÷ÒýµÄkeyÖµ¡£
SQL ServerÔÚÓÐЩÇé¿öÏ£¬Óоۼ¯Ë÷ÒýºÍ·Ç¾Û¼¯Ë÷Òý´æÔÚʱ£¬»áÑ¡Ôñ×߷Ǿۼ¯Ë÷Òý£¬¶ø²»×ß¾Û¼¯Ë÷Òý¡£
Àý×ÓÈçÏ£º
ÔÚ SQL Server µÄadventureWorksÊý¾Ý¿âÏ£¬ÔËÐÐÈçÏÂÓï¾ä£º
select DepartmentID,Name from HumanResources.Department
Departm ......