Still not clear if you want cdna, mrna, genomic...
~$ mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -D hg38 -e 'select geneSymbol,chrom,txStart,txEnd,txEnd-txStart as L from knownGene as K, kgXref as X where K.name=X.kgId and txEnd-txStart between 900 and 1100
' | head -n 20
geneSymbol chrom txStart txEnd L
OR4F5 chr1 69090 70008 918
RP11-34P13.9 chr1 160445 161525 1080
OR4F29 chr1 450739 451678 939
OR4F16 chr1 685715 686654 939
RP11-206L10.4 chr1 760910 761989 1079
NOC2L chr1 958245 959256 1011
KLHL17 chr1 961448 962478 1030
HES4 chr1 998969 999981 1012
AGRN chr1 1045398 1046349 951
RP11-54O7.14 chr1 1055032 1056116 1084
RP11-54O7.18 chr1 1062207 1063288 1081
RP11-465B22.8 chr1 1169356 1170343 987
FAM132A chr1 1242445 1243463 1018
UBE2J2 chr1 1255263 1256335 1072
PUSL1 chr1 1308787 1309840 1053
CPSF3L chr1 1314135 1315141 1006
MXRA8 chr1 1353214 1354247 1033
AURKAIP1 chr1 1374243 1375144 901
RP4-758J18.2 chr1 1399551 1400608 1057
gene ? you mean cDNA ?
I'm interested in retrieving a list of gene IDs of a particular length (let's say 10kb)
for you gene = genomic sequence?