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