1106c# base--The use of database variables, operators, if...else,while statements

Source: Internet
Author: User

Database --- variables (no effect on data in the database)

Role: The role of temporary storage data, play a cohesive role, in order to facilitate understanding of stored procedures.

Example: Declare @hello varchar (20)

Set @hello = ' Sales Department '

Select *from bumen where [email protected]

Select @hello =name from Bumen where code=1 (plus where condition)

Print @hello

Variables can also be used when placed in the middle of a select.....from , as an assignment statement, without performing a query function.

"Precautions" is simply the process of assigning a value to a variable and will not print the result

The "note" server name is equivalent to the instance name, and two versions of the database are installed and cannot be used at the same time . ( Point ) do the instance name.

1106c# base--The use of database variables, operators, if...else,while statements

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.