假设电话号码是NUMBER,则可以生成特定范围内的所有电话号码的列表
SELECt level - 1 + 8001231000 FROM dualConNECT BY level <= 8001239999-8001231000+1
然后,您可以将该范围内所有电话号码的列表加入到您的实际电话号码表中。就像是
WITH all_numbers AS ( SELECt level - 1 + 8001231000 phone_number FROM dual ConNECT BY level <= 8001239999-8001231000+1)SELECt * FROM all_numbers a WHERe NOT EXISTS( SELECt 1 FROM phone_numbers p WHERe a.phone_number = p.phone_number)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)