SQL Server Common statements

Source: Internet
Author: User
Tags sub account


SELECT * Into A--automatically generate table A, and table A's structure data is the same as table B
From B


INSERT into A--a to be created in advance
SELECT * FROM B


Insert into A (field 1, Field 2,...)

Values

(value 1, value 2,...)


INSERT INTO A

Values

(value 1, value 2,...)


Insert into A (field 1, Field 2,...)

Select field A, field B,... from B



Correct update:

Update Ut_syhh_ Conversion Rate Adjustment _ Total Account
Set customer number = B. Customer group number
From Ut_syhh_ conversion rate Adjustment _ Total account A, Ut_syhh_cs_ customer basic information Management B
where a. Customer number = B. Customer number
and B. Customer level = ' Sub Account '


Error Update:

Update Ut_syhh_ Conversion Rate Adjustment _ Total Account
Set A. Customer number = B. Customer group number
From Ut_syhh_ conversion rate Adjustment _ Total account A, Ut_syhh_cs_ customer basic information Management B
where a. Customer number = B. Customer number
and B. Customer level = ' Sub Account '

Error: Msg 4104, Level 16, State 1, line 1th
Cannot bind multiple-part identifiers "a. Customer number".

Cause of error:???

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

SQL Server Common statements

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.