Common SQL Server statements and SQL Server statements
Select * into A -- automatically generate Table A. The structure data of Table A is the same as that of Table B.
From B
Insert into A -- A must be created in advance
Select * from B
Insert into A (Field 1, Field 2 ,...)
Values
(Value 1, value 2 ,...)
Insert into
Values
(Value 1, value 2 ,...)
Insert into A (Field 1, Field 2 ,...)
Select field a, field B,... from B
Correct update:
Update ut_syhh _ discount rate adjustment _ total account
Set customer ID = B. Customer Group ID
From ut_syhh _ discount rate adjustment _ total account a, ut_syhh_cs _ customer Basic Information Management B
Where a. Customer ID = B. Customer ID
And B. Customer level = 'subaccount'
Error update:
Update ut_syhh _ discount rate adjustment _ total account
Set a. Customer ID = B. Customer Group ID
From ut_syhh _ discount rate adjustment _ total account a, ut_syhh_cs _ customer Basic Information Management B
Where a. Customer ID = B. Customer ID
And B. Customer level = 'subaccount'
Error: Message 4104, level 16, status 1, 1st rows
You cannot bind an identifier "a. Customer ID" consisting of multiple parts ".
Error cause :???
Create view
As
Select * from B
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.