May First Contact Select...into...from ... and insert Into...select ... There are many people will misunderstand, from the surface are all the relevant information query out, and then add to a table, in fact, is far from so simple, next, the pig with the most common expression for you to introduce the difference between the two.
Steps/Methods
1. First, let's take a look at the INSERT INTO SELECT statement, whose syntax is: INSERT INTO Table2 (field1,field2,...) Select Value1,value2,... from Table1.
2, the requirement here is that Table2 must already exist, if it does not exist, the system will prompt the object is invalid.
3, at the same time because Table2 already exist, so we can arbitrarily to add to the Table2 content of the column type, of course, including constants, perhaps through the following diagram, you will find the introduction of constants when the unusual phenomenon.
4. Next, select into the From statement, which is the form: select Vale1, value2 into Table2 from Table1.
5, here is required MyTable1 does not exist, because in the insertion time, the system will automatically create MYTABLE1, if the previous MyTable1 has been created, the system will be prompted to already have the table.
6, it is because of this feature, will bring us a lot of convenience, first of all, if I just want to MyTable2 the ID column in the table, then I just need to select the ID column, and then add to the new table can be.
7, if I want the Name column in MyTable2, then I just need to select the Name column and add it to the new table.
End
Attention matters
Application scope by the practitioner to find the answer themselves ~