欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

DB2批量插入测试数据

程序员文章站 2022-05-12 22:09:37
...

DB2 DB2 INSERT INTO USER (USERID, MOBILE)SELECT CHAR(ROW_NUMBER() OVER()) AS USERID, CHAR(13900000000 + ROW_NUMBER() OVER()) AS MOBILEFROM SYSCAT.COLUMNS T1 JOIN SYSCAT.COLUMNS T2 ON T1.COLNAME != T2.COLNAME FETCH FIRST 10000 ROWS ONLY

DB2 DB2
INSERT INTO USER (USERID, MOBILE)

SELECT CHAR(ROW_NUMBER() OVER()) AS USERID, 

CHAR(13900000000 + ROW_NUMBER() OVER()) AS MOBILE

FROM SYSCAT.COLUMNS T1 

JOIN SYSCAT.COLUMNS T2 ON T1.COLNAME != T2.COLNAME FETCH FIRST 10000 ROWS ONLY