我在oracle插入多行数据的时候,序号和我想匹配的字段弄混了,它居然自动按照字母给我排序了,怎么破 20
insertintoprofessionselectid_seq.nextval,cfrom(select'微商'cfromdualunionselect'coser'c...
insert into profession select id_seq.nextval,c from(
select '微商'c from dual
union
select 'coser'c from dual
union
select '情妇'c from dual
union
select '酒托'c from dual
union
select '淘宝店主'c from dual
union
select '个体户'c from dual
union
select 'ceo'c from dual
union
select '老板'c from dual);
这是其中一部分,只有2个字段,一个pro_id,一个profession
我的设想是1就对应微商,coser对应2,按我的排序来,结果出来却是1对应ceo,2对应coser,按首字母给我排……蛋疼,虽然我现在用起没什么影响…… 展开
select '微商'c from dual
union
select 'coser'c from dual
union
select '情妇'c from dual
union
select '酒托'c from dual
union
select '淘宝店主'c from dual
union
select '个体户'c from dual
union
select 'ceo'c from dual
union
select '老板'c from dual);
这是其中一部分,只有2个字段,一个pro_id,一个profession
我的设想是1就对应微商,coser对应2,按我的排序来,结果出来却是1对应ceo,2对应coser,按首字母给我排……蛋疼,虽然我现在用起没什么影响…… 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询