Stairway to T-sql:beyond the Basics level 9:dynamic T-SQL Codeby Gregory Larsen, 2016/07/29 (first published:2014/07/23)Original link: http://www.sqlservercentral.com/articles/Stairway+Series/113118/The SeriesThis article is part of the series: the
1. View the information for the tableIn the TSQL editor, select a table,Click Alt+f1 to view the table's attribute definitions2, use ALT to BULK INSERT commasUsing the IN clause in the TSQL, in the (value_list) list, there are often many numbers,
1, demand analysisImplement hierarchies in TSQL, such as a data structure, province, city, County, township, village, how to use a table to represent this data structure, and allow is asymmetric, for example, Shanghai is a municipality, there is no
The syntax of plsql is different from that of tsql. For more information, see.
The syntax of plsql is different from that of tsql. For more information, see.
Insert into testtable (recordnumber, currentdate) values (I, sysdate );
Print '';
Select @
In TSQL, there is a exists clause that indicates that there is a match on any row of data, but how to represent the entire row of data. For example, it means that a student took all courses, which is a classic example of the "match all"
The first part: The TSQL Output keyword has two application scenarios1, as the parameter type of the stored procedure, returns data from the stored procedure2, return the information in the rows affected by the INSERT, UPDATE, Delete, or merge
TSQL HierarchyID Data Type usageApril 25, 2017 09:47:46Number of readings:The HierarchyID data type is a variable-length system data type. You can use HierarchyID to represent locations in a hierarchy. columns of type HierarchyID do not
As a DBA, you must deal with a variety of tsql code. See the following three examples:
1: parentheses are used in distinct:
SELECT DISTINCT (TransactionID),ProductID,TransactionTypeFROM adventureworks.Production.TransactionHistoryArchive
The
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.