Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I want to select all tenth in a field! :( I know this way; "Km" = 10 or "Km" = 20 ... and so, but I am pretty sure theres other way.

I am not SQL literate, but with your help in this forums I have managed to do some things, however the most basic are missing in different posts and I would like to find a place with basic (and medium) SQL expressions with practical examples to look for. I don´t usually post, but this could be of interest for some people outside.

Para los que hablan español, esto es una pregunta muy básica y hasta tonta como dice el titulo, pero quisiera un sitio para encontrar expresiones SQL que son básicas, y que quizás para los que no somos letrados en esas "ciencias" podriamos usar de referencia, recuerdo la ayuda de ESRI tenía unos ejemplos de expresiones muy útiles y ultimamente con el Xtools resolvía. Mi problema es sencillo: Seleccionar todas las decimas de un campo de Numero de Kilometros. Se hacerlo seleccionando uno por uno ("Km" = 10 or "Km" = 20, y asi) pero debe haber una forma más sencilla.... que pena preguntar algo tan básico pero tanta búsqueda en foros y demás, todos piensan que ya uno maneja estas cosas básicas. saludos!

share|improve this question

marked as duplicate by whuber Aug 30 '13 at 17:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Additional solutions appear at and – whuber Aug 30 '13 at 17:51
up vote 4 down vote accepted

Not sure I understood your question, but it looks like it can be achieved with

SELECT * FROM table WHERE chosencolumn % 10 = 0

I'm not sure about the syntax, but if you want to pick all the whole ten's from an integer field this should work.

share|improve this answer
Thanks @Dzenan, You did it! "KM" % 10 = 0 – Carlos Rivas Sep 4 '13 at 5:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.