Basic Database interview and database interview
1. Update table data (table_ B is updated through table_A)
The structure of tables A and B is as follows:
Create table [dbo]. [Table_A] ([Id] [varchar] (36) not null, [Name] [nvarchar] (50) NULL) ON [PRIMARY]
Create table [dbo]. [Table_ B] ([Id] [varchar] (36) NOT NULL, [Name] [varchar] (50) NULL) ON [PRIMARY]
The data before the test is as follows:
Update statement:
Update Table_ B set Table_ B .Name = A. Name from Table_ B as B, Table_A as Awhere B. Id = A. Id
The result is as follows:
Note:
SQL is not frequently written, and many things are forgotten. It seems that your data knowledge is still too poor. mark it here.
2. Comparison of clustered indexes and non-clustered indexes (to be continued)
Copyright Disclaimer: Author: jiankunking Source: http://blog.csdn.net/jiankunking this article copyright to the author and CSDN a total, welcome to reprint, but without the author's consent must retain this statement, and in the Article Page clearly given the original connection.