SQL Server common functions and techniques

Source: Internet
Author: User

Using SQL Server for a long time, today especially want to summarize, is a review it!

Common functions:

1. ISNULL (columnName, ")

First determine if the field is empty, if it is empty, return '; Otherwise, the value of the field is returned.

2. DATEDIFF (datepart,startdate,enddate)

No wordy, direct reference link

3.

Useful statements:

1. Sometimes there are more stored procedures defined in the project, and it is necessary to determine which stored procedure is used for a given table, and there are two ways to do so:

A. SSMs interface, select the table you want to check, right-click to find dependencies, it will be displayed

B. Using the statement:

2.

SQL Server common functions and techniques

Related Article

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.