Forum

How to Find out all...
 
Share:
Notifications
Clear all

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


Posts: 47
Guest
Topic starter
(@Rakesh)
Eminent Member
Joined: 4 years ago

Is there a way to achieve this? 

1 Reply
Posts: 32
 VK
Guest
(@VK)
Eminent Member
Joined: 4 years 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

Self Learning Video Tutorials - Software Course

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: