2

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!

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.

4

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.

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