Basic Database interview and database interview

Source: Internet
Author: User

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.

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.