Select into from prompt Undeclared variable... solution to the error

Source: Internet
Author: User

During the database table copy and backup operations, we should all know that there are two methods: select into from and insert into select? I will not talk about the differences and usage of the two methods here. If you need them, refer to the article on this site:

Differences and usage of select into from and insert into select

However, when I used select into from to back up mysql Data Tables today, I always returned [Err] 1327-Undeclared variable :...... this error is hard to understand. It is only known after query of relevant information that mysql database does not support the select into from statement, however, after research, we can solve this problem through another work und. Let's talk about the solution to this problem!

You can use

Create table Table2 (Select * from Table1);

This statement is replaced

SELECT vale1, value2, value3 into Table2 from Table1;

The following is an example of my actual operations!

Create table www.phpernote.com (Select A.id,B.id as typeId,A.brand,A.quanpin,A.simple from brands as A,cartype as B where A.type=B.name group by A.brand);

Join two tables to get a query result and insert the result to a newly created table www.phpernote.com.

Articles you may be interested in
  • Php prompts PHP Warning: date (): It is not safe to rely on the... solution to the error
  • Differences and usage of select into from and insert into select
  • Solution to the DedeTag Engine Create File False error in dedeCMS
  • Solution to the error "event is not defined" prompt in Firefox
  • Php prompts Maximum execution time of 30 seconds exceeded... solution to the error
  • Php prompts Call to undefined function curl_init () Error Solution
  • How to solve the Call to undefined function curl_init error in php running?
  • PHP reports Fatal error Allowed memory size of... how should we solve the problem of insufficient memory?

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.