首页  >  文章  >  数据库  >  DB2批量插入测试数据

DB2批量插入测试数据

WBOY
WBOY原创
2016-06-07 14:57:063689浏览

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
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn