Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Query the list of CITY names from STATION that do not start with vowels and do not end with vowels. Your result cannot contain duplicates.

SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[^aeiou].*[^aeiou]$';
Comment

Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates.

SELECT DISTINCT city FROM station WHERE city RLIKE '[aeiouAEIOU]$';
Comment

Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates.

select distinct city from station where city not regexp '^[aeiou]' or city not regexp '[aeiou]$';
Comment

PREVIOUS NEXT
Code Example
Sql :: capitalize 1st letter in sql server 
Sql :: postgresql make each element in array distinct 
Sql :: psql show with user is logged in 
Sql :: mysql insert generate serie 
Sql :: delete all entries postgres 
Sql :: show table columns 
Sql :: ddl materialized view 
Sql :: oracle list dates between 
Sql :: sql week commencing date 
Sql :: mysql show all tables 
Sql :: insert into table from another table mysql 
Sql :: mssql int max value 
Sql :: mysql delete all where id is not equal 
Sql :: sql get number of days between two dates 
Sql :: drop table sql 
Sql :: row number mysql 
Sql :: inner join in update query mysql 
Sql :: get first 3 letter of department name in sql 
Sql :: mysql select where text contains 
Sql :: mysql sysdate 
Sql :: oracle ora-00054 causes 
Sql :: sql server date now 
Sql :: mysql safe mode 
Sql :: get date from timestamp in mysql 
Sql :: An error occurred while installing mysql2 (0.5.3) 
Sql :: oracle sysdate - 1 month 
Sql :: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint 
Sql :: job for postgresql.service failed because the control process exited with error code. see "systemctl status postgresql.service" and "journalctl -xe" for details. 
Sql :: add column not null with default value postgres 
Sql :: trim leading zeros in sql 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =