• <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 查询

      SQL query to check if a name begins and ends with a vowel(用于检查名称是否以元音开头和结尾的 SQL 查询)

          <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 查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Building a comma separated list?(建立一个逗号分隔的列表?)
                Errors in SQL Server while importing CSV file despite varchar(MAX) being used for each column(尽管每列都使用了 varchar(MAX),但在导入 CSV 文件时 SQL Server 中出现错误)
                How can I import an Excel file into SQL Server?(如何将 Excel 文件导入 SQL Server?)
                Export table to file with column headers (column names) using the bcp utility and SQL Server 2008(使用 bcp 实用程序和 SQL Server 2008 将表导出到带有列标题(列名称)的文件)
                Concat field value to string in SQL Server(将字段值连接到 SQL Server 中的字符串)
                SQL Server Bulk insert of CSV file with inconsistent quotes(SQL Server 批量插入带有不一致引号的 CSV 文件)
                <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>
                          <tbody id='2MFFi'></tbody>
                          <tfoot id='2MFFi'></tfoot>