Forum

How to Find out all...
 
Notifications
Clear all

How to Find out all the students names with the letter starts with S without using Like Operator?


Rakesh
Posts: 47
 Rakesh
Topic starter
(@Rakesh)
Joined: 1 year ago

Is there a way to achieve this? 

1 Reply
VK
Posts: 15
 VK
(@VK)
Joined: 1 year ago

You can use three methods to acheive this. 

Using Method 1 Select * from Students where CHARINDEX('S',Name)=1

Using Method 2 Select * from Students where LEFT(Name,1)='S'

Using Method 3 Select * from Students Where SUBSTRING(Name,1,1)='S'  ( First 1 is Number of Char and Second 1 is position)

Is this useful? 

Reply
Share: