Home > Database > Mysql Tutorial > body text

1106SQLserver基础

WBOY
Release: 2016-06-07 15:51:18
Original
1170 people have browsed it

数据库 --- 变量 (对数据库中的数据没有任何影响) 作用:临时存储数据的作用,起一个衔接的作用,为了方便理解存储过程。 例:Declare@hellovarchar(20) Set@hello=销售部 select * from bumenwherename=@hello Select@hello=namefrombumenwherecode=1(加

数据库---变量(对数据库中的数据没有任何影响)

作用:临时存储数据的作用,起一个衔接的作用,为了方便理解存储过程。

1106SQLserver基础

例:Declare @hello varchar(20)

Set @hello=’销售部’

select *from bumen where name=@hello

Select @hello=name from bumen where code=1(加where条件)

Print @hello

变量放在select.....from中间时也可以使用,可以当作赋值语句,不执行查询功能。

【注意事项】只是给变量赋值的过程,不会打印结果

1106SQLserver基础

1106SQLserver基础

【注意事项】服务器名称就相当于实例名,同时安装两个版本的数据库,不能同时都用.()做实例名。

1106SQLserver基础

1106SQLserver基础

1106SQLserver基础

1106SQLserver基础

1106SQLserver基础

1106SQLserver基础

1106SQLserver基础

1106SQLserver基础

1106SQLserver基础

1106SQLserver基础

1106SQLserver基础1106SQLserver基础

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!