Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Oracle 数据库。成像我有一个表格,其中一行如下
col1 | col2 | col3 'Str1' | 'Str2' | 4
col3=4 的值应生成 4 行,如下所示:
col1 | col2 | col3 'Str1' | 'Str2' | 1 'Str1' | 'Str2' | 2 'Str1' | 'Str2' | 3 'Str1' | 'Str2' | 4
在屏幕前几个小时后仍然没有运气 - 我如何创建这样的选择查询???
如果您创建一个整数序列,您可以这样做。这是一种方法:
with seq as ( select level n from dual connect by level <= 100 ) select t.col1, t.col2, seq.n from t join seq on seq.n <= t.col3