Datenbank: MySql • Version: 5 • Zugriff über: Direct MySQL
select where anhand ein Teil des Strings?
Hi,
Es gint ein Table mit einem Column von Typ VARCHAR(50). Ich will jetzt alle Einträge aus der Tabele mit Select holen, die ein bestimtes Teis des Strings enthält. Beispiel: Tabele: "test1", columns: "id, theString" id | the string 1 | "hey" 2 | "hey du" 3 | "nicht du" 4 | "ok" 5 | "dann beide halt" 6 | "hey, das war´s" Ich will jetzt alle Einträge die "hey" Enthalten mit SELECT holen. Wie sieht die entsprächende SQL Query aus ?
SQL-Code:
select * from test1 where ???
|
Re: select where anhand ein Teil des Strings?
SQL-Code:
where thestring like '%hey%'
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:42 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz