Home > database >  How do you write for this SQL?
How do you write for this SQL?

Time:10-05

A table
Id order
1 cpio textxx
2 mkdir dfa

Table b
The command color
Cp blue
Cpio red
Demanded to query a table contains b command order data in the table,
Before I write so select * from a where locate (b.com mand, a.o rder)=1 original data are normal, the results in the table when b in cp and cpio contain cp, the query result is:
Id order
1 cpio textxx
2 cpio textxx
A data matching the two duplicate data, could you tell me who can help me solve the

CodePudding user response:

B.com mand add a space and then after the match,

CodePudding user response:

reference 1st floor ACMAIN_CHM response:
b.com mand add a space and then after the match,


Tried it on, there is no effect

CodePudding user response:

Locate (concat (b.com mand, ' '), a.o rder)=1

Don't know how to add a space is,
  • Related