Select all where [first letter starts with B]

后端 未结 5 1164
耶瑟儿~
耶瑟儿~ 2020-12-08 06:28

This is a follow up question to my previous one. I want to write a MYSQL statement that echoes every entry that starts with letter B.

Function.php

f         


        
5条回答
  •  不思量自难忘°
    2020-12-08 06:44

    This will work for MYSQL

    SELECT Name FROM Employees WHERE Name REGEXP '^[B].*$'
    

    In this REGEXP stands for regular expression

    and

    this is for T-SQL

    SELECT Name FROM Employees WHERE Name LIKE '[B]%'
    

提交回复
热议问题