Return the value to the left

Asked

Viewed 34 times

1

good morning.

A question, how can I return the results of a column that contains only the values to the left that start with the word 'car' for example? I am using sql server.

Thank you.

  • I didn’t get the part "..apenas os valores a esquerda..."

1 answer

3


You can use the operator like:

SELECT * FROM EXEMPLO WHERE VALOR LIKE 'CARRO%'

The operator % is the joker, you can use it in any position. For example, if you want to see if the word is at the end of the result you would use %carro, if in the middle of the result %carro% and so on.

  • 1

    Show Diego, it worked perfect. Thank you very much, abs.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.