In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "the introduction of the basic functional grammar of SQL Server". In the daily operation, I believe many people have doubts about the basic functional grammar of SQL Server. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "introduction to the basic functional grammar of SQL Server". Next, please follow the editor to study!
1 comment refers to the text string that is not executed in the program code, which is a description of the program, which can improve the readability of the program and make the program code easier to maintain. it is generally embedded in the program and displayed with special tags. In Transact-SQL, comments can be included in batches, stored procedures, triggers, and there are two types of comments: -: this is a comment character made up of two hyphens in the ANSI standard for single-line comments. / * … * /: this is the same program comment character as the C language. / * is used at the beginning of the comment text and * / at the end of the note text. You can identify the multiline text as the comment statement in the program.
2 output statement (PRINT) output statement PRINT statement is used to deliver the message to the client application, usually displayed on the user screen, the message string can be up to 8000 characters long, and any character more than 8000 is truncated. PRINT statements can only transfer text strings, or individual character variables. PRINT statements can also pass global variables, but they can only be global variables of character type. The syntax of the PRINT statement is as follows: PRINT 'text' | @ local variable | @ @ global variable | string expression although the PRINT statement can only display strings, many functions are provided in Transact-SQL to convert other data types into strings.
3 error handling statement (RAISERROR) RAISERROR command is used to return user-specified information when the SQL Server 2005 system returns an error message. The RAISERROR command automatically records the error number specified in the global variable @ @ error and transmits the error number, severity, error status, and the text of the error message to the customer's application. RAISERROR is more powerful than PRINT in returning messages to applications, so if users need to call SQL Server 2005 database system errors in their programs, they need to use the RAISERROR command.
4 option setting statement (SET) SQL Server 2005 database system sets options that affect how the server handles certain conditions that exist during the user's connection to the server or in the user's stored procedures and triggers, and can be set using the set statement. The syntax is as follows: SET condition {on | off | Value}
At this point, the study of "introduction to the basic functional Grammar of SQL Server" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.