Select
Want to realize a very simple function cost me a long time;
Objective: To record a material number copy a copy of the primary key and then store it in the original table;
1) using memory
Select * into a from B in this form, death is not good ~ ~
2) online Google a bit
==>http://fengyu.china.com/sql1.htm
Insert (the statement that inserts a record into the datasheet)
INSERT into table name (field name 1, field Name 2, ...) Values (value 1, value 2, ...);
INSERT into table name (field name 1, field Name 2, ...) SELECT (field name 1, field Name 2, ...) from another table name;
The second syntax fits well and decides to try.
Do not want or hint: right parenthesis missing!
Strangely, carefully again and again, found that the grammatical format is exactly the same as above;
~~~~~~~~~~~~~~~ No words
Try to remove the parentheses.
INSERT into table name (field name 1, field Name 2, ...) SELECT Field name 1, field Name 2, ... from another table name;
OK, really do not understand, head dizzy, forget, write down, next time maybe forget
INSERT into table name (field name 1, field Name 2, ...) SELECT (field name 1, field Name 2, ...) from another table name;
==> red brackets must be removed ~~!!
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.