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?

2 Posts
1 Users
0 Likes
276 Views
Rakesh
Posts: 47
 Rakesh
Guest
Topic starter
(@Rakesh)
Eminent Member
Joined: 2 years ago

Is there a way to achieve this? 

1 Reply
VK
Posts: 15
 VK
Guest
(@VK)
Active Member
Joined: 2 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

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: