das, was ich tun möchte, erhalten Sie die Buchtitel, die mit "the" und dann 3 bis 8 Zeichen und dann "CONCAT" Thema mit einem bestimmten Text beginnen. Ich versuchte dies aber es hat nicht funktioniert:Geschachtelte SELECT mit REGEXP in MySql
select concat((select title from books where title REGEXP '^the.{3,8}$'), '.....') from books;
Dies ist, was ich bekommen:
+-----------------------------------------------------------------------------+
| concat((select title from books where title REGEXP '^the.{3,8}$'), '.....') |
+-----------------------------------------------------------------------------+
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
| The Circle..... |
+-----------------------------------------------------------------------------+
16 rows in set (0.00 sec)
Können Sie bitte ein Beispielergebnis geben? – cdaiga
Ihr Regex '^ the. {3,8} $' schlägt vor, dass der ausgewählte 'Titel' der' books' Tabelle mit 'the' beginnen sollte und dann mit' 3-8' Zeichen endet. Ist das was du willst ? – SALEH
Ich habe die Ausgabe, die ich bekomme –