What is the error of this SQL statement? Solution

Source: Internet
Author: User
What is the error of this SQL statement ?? SQLcodeSELECT * FROM 'offcn _ c_all2012 'WHERE ('type' LIKE 'authorization') OR ('zhuanye' LIKE '% sociology % ') OR ('zhuanye 'like' % where is the error of this SQL statement taught by law OR philosophy ??
SQL code
  SELECT * FROM 'offcn _ c_all2012 'WHERE ('type' LIKE 'authorization') OR ('zhuanye' LIKE' % % ') OR ('zhuanye 'like' % bachelor's degree in law OR philosophy %') OR ('zhuanye 'like' % social work % ') OR ('zhuanye 'like' % bachelor's degree in law OR philosophy %') OR ('zhuanye 'like' % social work % ') OR ('zhuanye 'LIKE' % demographic % ') OR ('zhuanye' LIKE '% Political science %') OR ('zhuanye 'LIKE' % anthropology % ') OR ('zhuanye 'LIKE' % Female % ') OR ('Other' LIKE 'authorization') OR ('Other' LIKE' % sociology % ') OR ('Other' LIKE '% bachelor's degree in law OR philosophy %') OR ('Other' LIKE '% social work % ') OR ('Other' LIKE '% bachelor's degree in law OR philosophy %') OR ('Other' LIKE '% social work % ') OR ('Other' LIKE '% demographic %') OR ('Other' LIKE '% Political science %') OR ('Other' LIKE '% anthropology % ') OR ('Other' LIKE '% Female %') LIMIT 0, 10

The error message is: #1054-Unknown column 'other' in 'where clause'


I can't find any errors. In addition, the database has these fields.



------ Solution --------------------
Re-writing the other of the select statement is sometimes unreliable. Then, check the table structure to see if there are any spaces or which character is wrong. The insert statement I copied last time also says there is a problem. Check carefully.

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.