Return the value to the left

1

Good morning.

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

Thank you.

    
asked by anonymous 12.06.2018 / 15:25

1 answer

3

You can use the like operator:

SELECT * FROM EXEMPLO WHERE VALOR LIKE 'CARRO%'

The % operator is the wildcard, 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 would use %carro% and so on.

    
12.06.2018 / 15:29