SQL Regular Expression
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways
Answers ( 5 )
Select * from EmployeeDetail where FirstName
LIKE ‘[^a-p]%’
select * from EmployeeDetail WHERE FirstName LIKE ‘[!a-p]%’;
Select FirstName from EmployeeDetail
where FirstName regexp ‘^[^a-p]’
—
1st ^ – matches the position at the beginning of the searched string
2nd^ – matches any character not specified inside the square brackets
Maybe, you should use
where FirstName regexp ‘^[^a-p].+$’
USING LIKE Operator
Select * from Table
where First_Name LIKE ‘[!a-p]%’
USING Regular Expression
select * from Table
where First_Name REGEXP ‘^[^a-p]%’