Home >Database >Mysql Tutorial >ORACLE列值合併

ORACLE列值合併

WBOY
WBOYOriginal
2016-06-07 16:22:46950browse

CREATE TABLE MyTest(xType NUMBER,City nvarchar2(200)); / INSERT INTO MyTest(xType,City) SELECT 1,N'北京' FROM dual UNION ALL SELECT 1,N'上海' FROM dual UNION ALL SELECT 1,N'广州' FROM dual UNION ALL SELECT 2,N'武汉' FROM dual UNION ALL SEL

CREATE TABLE MyTest(xType NUMBER,City nvarchar2(200));

/

 

INSERT INTO MyTest(xType,City)

SELECT 1,N'北京' FROM dual UNION ALL

SELECT 1,N'上海' FROM dual UNION ALL

SELECT 1,N'广州' FROM dual UNION ALL

SELECT 2,N'武汉' FROM dual UNION ALL

SELECT 2,N'杭州' FROM dual UNION ALL

SELECT 2,N'厦门' FROM dual

COMMIT;

/

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