SQL Server > Query

Starts with query in SQL Server

How to filter records from the table whose a column value starts with a specific character (in SQL Server)?


To get records from the table that contains a specific word, we can combine the columns in a single value and use wild card characters.

SELECT * FROM PersonalDetails
WHERE FirstName + ' ' + LastName LIKE 'S%'

Above script will list all records from the PersonalDetails table whose combination of FirstName and LastName starts with “S”.

For more wild card use in the SQL query, read wild card related points demonstrated in this eBook.

 Views: 78239 | Post Order: 58



Write for us






Hosting Recommendations