Ver original$consulta="SELECT registros.Codigo FROM registros, usados WHERE registros.Codigo<>usados.Codigo";