Home  >  Article  >  Database  >  DB2批量插入测试数据

DB2批量插入测试数据

WBOY
WBOYOriginal
2016-06-07 14:57:063689browse

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
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn