SQL Server Learning

Source: Internet
Author: User

The 1.distinct is used to return a value that is removed from the duplicate and used to remove the select distinct name from student

2.select newid () generates a unique value that is not duplicated. Both globally unique identifiers

The difference between 3.varchar and char:







Although VARCHAR2 is more space-saving than char, if a VARCHAR2 column is often modified and the length of each modified data is different, this causes a ' row-migration ' phenomenon, which creates redundant I/O, which is to be avoided in database design and tuning. , it would be better to use char instead of VARCHAR2 in this case.

4.sql in <> can be used! = substitution means not equal.

5.order by sorts the results of the query desc descending, ASC Ascending. Two conditions sorted by "," separated. Order By default Ascending.

6.select * into new table from the old table is used to quickly back up old tables.

7.insert into table 1 (column 1, column 2) Select (column 1, column 2) from table 2 Insert table 2 data into table 1.

SQL Server Learning

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.