Home > database >  SQL query has to check up with number paragraphs, how to generate a number with number check all num
SQL query has to check up with number paragraphs, how to generate a number with number check all num

Time:09-18


SQL query has to check up with number paragraphs, how to generate a number with number check all number

CodePudding user response:

引用 1 楼 大脸猫o 的回复:
matrk
手机看到的做了个标记不会修改原始帖子了,

I solve the SQL for your reference:

With t as
Start_num (select '000466', '000499' end_num from dual)
The select lpad (+ rownum start_num - 1, 6, '0') tel_no
The from t
Connect by level & lt;=(end_num - start_num + 1)

CodePudding user response:

Guide a excel list haoma to the database, there is only one field, the value from 00000000-99999999, and then from haoma table query is greater than the number inside period of less than the number check data
  • Related