Alex Guerin
Alex Guerin

Reputation: 2386

SQL Server: Select X amount of character from value

I have a database with a nvarchar(50) column. All rows have >25 chars always in this column.

I would like to return only the first 10 characters from column WITHOUT getting all the data from SQL and getting the 10. Is it possible to ask SQL to return on the 1st 10 from a specific column?

Upvotes: 1

Views: 3101

Answers (1)

a1ex07
a1ex07

Reputation: 37354

Are you looking for LEFT? SELECT LEFT(col_name,10) FROM your_table

Upvotes: 3

Related Questions