How this SQL statement should be modified under

Source: Internet
Author: User
How should this SQL statement be modified?
SQL Code
  
   Select si.user_id from Ecs_store_info as Si WHERE si.store_name like (SELECT wl.store_name from Ecs_wpaqq_log as WL where Wl.lngshopid=0)
is how to use the SELECT statement after the like key

------Solution--------------------
LZ idea I generally understand, but like is fuzzy match a string of characters. LZ if you want to be in a lot of characters, random fuzzy match any one, can only use in or through PHP to iterate the results and then re-SQL, this is not seen how to implement in a SQL, but there should be a great God can do it, I am not clear.
------Solution--------------------
In the following sentence, I test in Oracle is possible:
SELECT * from the users u where u.name like '% ' | | (select name from Users where id=1) | | ' %';
------Solution--------------------
LS, if only one piece of data can be fetched in the subquery, then the LZ problem is not a problem.

The crux of the problem is that he matches a result set in the like. I just checked, and the function in MySQL didn't match a string of characters.

, LZ you give up, it is best to change the wording, because even if the implementation of SQL statements, efficiency will be surprisingly under.
------Solution--------------------
discuss
SQL Code
Select si.user_id from Ecs_store_info as Si WHERE si.store_name like (SELECT wl.store_name from Ecs_wpaqq_log as WL where Wl.lngshopid=0)
is how to use the SELECT statement after the like key
  • 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.