0

我试图弄清楚如何在存储过程中使用插入语句。我想将数据放入表中

像这样(概念,a,b,c,d,e,f,g)

但我想得到这样的结果:

concept  a    b
concept  c    d 
concept  d    e 
concept  f    g

我想我需要一个字符串吗?我怎样才能创建字符串?

4

1 回答 1

0

问题有点模糊,但这应该可以工作,您只需要在表中插入多个值,以指示新行。

样本:

INSERT INTO example
  (Concept, element1, Element2)
VALUES
  (Concept,a,b),
  (Concept,c,d),
  (Concept,e,f),
  (Concept,g,h);

输出:

Concept | Element1 | Element2 // table headers
concept |    a     |  b
concept |    C     |  D
concept |    e     |  f  //table elements
concept |    g     |  h

或看这里更多:)

于 2013-10-07T05:13:47.400 回答