当前位置:Gxlcms > mysql > ORACLE列值合併

ORACLE列值合併

时间:2021-07-01 10:21:17 帮助过:26人阅读

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;

/

人气教程排行