Jump to content


  • entries
  • comments
  • views

Contributors to this blog

  • staff 152
  • jpaulino 16
  • anolsi 16
  • apocsantos 6
  • Rui Carlos 4
  • Hipnoted 2
  • HecKel 1
  • pedrotuga 1
  • _JR_ 1

SQL Curtas — Intervalos de datas




Um dos problemas mais habituais em programação SQL é pedir dados que aconteçam no intervalo de duas datas. O tipo de dados dos campos de data/hora variam conforme o SGBD (DATE, TIME, DATETIME, DATETIME2, SMALLDATETIME, etc.), mas o problema descrito em baixo é semelhante em todos.

Problema: Necessito dos registos cujo campo CampoData está no intervalo 2016-01-01 (inclusive) a 2016-12-31 (inclusive).

Ler mais…



Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.