+ 2
How to extract records of "PlayerName" who have "David" in his name at any position from the "tournament" table In MS SQL Server
Suppose that there are following records in "PlayerName" :- 1. David 2. David Bekham 3. Davidson 4. Bred david 5. Harleydavidson 6. David Rooney 7. Don David Bradman Note :- I don't want that my result show "Harleydavidson" and "Davidson" type of name... I want those player who have only "David" name or with surname.
6 odpowiedzi
+ 3
If you were to have columns in PlayerName called FirstName & LastName, then you could do the following
SELECT * from PlayerName
WHERE FirstName = 'David' OR LastName = 'David';
+ 3
Or you could try this
SELECT * from PlayerName
WHERE Name LIKE 'David';
This assumes your column containing these names is called Name.
It should return any row which has David as a stand-alone string
+ 3
SELECT * from Tournament where PlayerName LIKE 'David%';
+ 1
Rik Wittkopp if I applied ur statement then it's also shows the name "Davidson"...
But I only want those player name whose name is "David".. It can be first name, last name, or middle name.
0
I'm not sure but you can try Select * from Tournament where PlayerName LIKE '_David_';
- 1
MUSAB lives gsfbs