• <bdo id='Sv1FP'></bdo><ul id='Sv1FP'></ul>
      <legend id='Sv1FP'><style id='Sv1FP'><dir id='Sv1FP'><q id='Sv1FP'></q></dir></style></legend>
      <i id='Sv1FP'><tr id='Sv1FP'><dt id='Sv1FP'><q id='Sv1FP'><span id='Sv1FP'><b id='Sv1FP'><form id='Sv1FP'><ins id='Sv1FP'></ins><ul id='Sv1FP'></ul><sub id='Sv1FP'></sub></form><legend id='Sv1FP'></legend><bdo id='Sv1FP'><pre id='Sv1FP'><center id='Sv1FP'></center></pre></bdo></b><th id='Sv1FP'></th></span></q></dt></tr></i><div id='Sv1FP'><tfoot id='Sv1FP'></tfoot><dl id='Sv1FP'><fieldset id='Sv1FP'></fieldset></dl></div>

    1. <small id='Sv1FP'></small><noframes id='Sv1FP'>

    2. <tfoot id='Sv1FP'></tfoot>
    3. 用于检查名称是否以元音开头和结尾的 SQL 查询

      时间:2023-10-08

          <small id='8INnX'></small><noframes id='8INnX'>

            <tbody id='8INnX'></tbody>

          • <bdo id='8INnX'></bdo><ul id='8INnX'></ul>

            <i id='8INnX'><tr id='8INnX'><dt id='8INnX'><q id='8INnX'><span id='8INnX'><b id='8INnX'><form id='8INnX'><ins id='8INnX'></ins><ul id='8INnX'></ul><sub id='8INnX'></sub></form><legend id='8INnX'></legend><bdo id='8INnX'><pre id='8INnX'><center id='8INnX'></center></pre></bdo></b><th id='8INnX'></th></span></q></dt></tr></i><div id='8INnX'><tfoot id='8INnX'></tfoot><dl id='8INnX'><fieldset id='8INnX'></fieldset></dl></div>

              <legend id='8INnX'><style id='8INnX'><dir id='8INnX'><q id='8INnX'></q></dir></style></legend>

                <tfoot id='8INnX'></tfoot>
                本文介绍了用于检查名称是否以元音开头和结尾的 SQL 查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我想从表 STATION(id, city, longitude, latitude) 中查询 CITY 名称的列表,这些名称的第一个和最后一个字符都是元音.结果不能包含重复项.

                I want to query the list of CITY names from the table STATION(id, city, longitude, latitude) which have vowels as both their first and last characters. The result cannot contain duplicates.

                为此,我写了一个类似 WHERE NAME LIKE 'a%' 的查询,它有 25 个条件,每个元音对应其他每个元音,这非常笨拙.有没有更好的方法?

                For this is I wrote a query like WHERE NAME LIKE 'a%' that had 25 conditions, each vowel for every other vowel, which is quite unwieldy. Is there a better way to do it?

                推荐答案

                您可以使用 正则表达式:

                SELECT DISTINCT city
                FROM   station
                WHERE  city RLIKE '^[aeiouAEIOU].*[aeiouAEIOU]$'
                

                这篇关于用于检查名称是否以元音开头和结尾的 SQL 查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:将几个查询的结果相加,然后在 SQL 中找到前 5 个 下一篇:MySQL DECLARE 中的 SELECT INTO 变量导致语法错误?

                相关文章

                <legend id='2MFFi'><style id='2MFFi'><dir id='2MFFi'><q id='2MFFi'></q></dir></style></legend>
                <i id='2MFFi'><tr id='2MFFi'><dt id='2MFFi'><q id='2MFFi'><span id='2MFFi'><b id='2MFFi'><form id='2MFFi'><ins id='2MFFi'></ins><ul id='2MFFi'></ul><sub id='2MFFi'></sub></form><legend id='2MFFi'></legend><bdo id='2MFFi'><pre id='2MFFi'><center id='2MFFi'></center></pre></bdo></b><th id='2MFFi'></th></span></q></dt></tr></i><div id='2MFFi'><tfoot id='2MFFi'></tfoot><dl id='2MFFi'><fieldset id='2MFFi'></fieldset></dl></div>
                1. <small id='2MFFi'></small><noframes id='2MFFi'>

                      <bdo id='2MFFi'></bdo><ul id='2MFFi'></ul>
                    <tfoot id='2MFFi'></tfoot>