Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
クエリを実行したい。android sql dbで利用できるかどうかはわかりません。開始文字と終了文字、および文字列の長さに応じてクエリを作成したい。私のデータベースには、hello、how、hurray、honeyがあるとします。データベースから蜂蜜を取得したいので、「h」で始まり「y」で終わる文字列を見つけるようなクエリを作成したいとします。単語の長さは 5 です。これを行うには、クエリ文字列はどうなりますか?
そのはず
select * from `table` where LENGTH(`field`) = 5 and `field` LIKE `h%y`