MySQL使用Union创建视图报错

论坛 期权论坛     
选择匿名的用户   2021-5-30 00:12   363   0
<div class="blogpost-body" id="cnblogs_post_body">
<div class="line number1 index0 alt2" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;font-size:13px;color:rgb(51,51,51);border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;background-image:none;">
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">mysql&gt; </code>
  <code class="sql keyword" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;font-weight:700;min-height:auto;color:rgb(255,120,0);background:none;">select</code>
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">* </code>
  <code class="sql keyword" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;font-weight:700;min-height:auto;color:rgb(255,120,0);background:none;">from</code>
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">test_main;</code>
</div>
<div class="line number2 index1 alt1" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;font-size:13px;color:rgb(51,51,51);border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;background-image:none;">
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">&#43;</code>
  <code class="sql comments" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,130,0);background:none;">----&#43;-------&#43;</code>
</div>
<div class="line number3 index2 alt2" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;font-size:13px;color:rgb(51,51,51);border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;background-image:none;">
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">| id | value |</code>
</div>
<div class="line number4 index3 alt1" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;font-size:13px;color:rgb(51,51,51);border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;background-image:none;">
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">&#43;</code>
  <code class="sql comments" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,130,0);background:none;">----&#43;-------&#43;</code>
</div>
<div class="line number5 index4 alt2" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;font-size:13px;color:rgb(51,51,51);border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;background-image:none;">
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">|  1 | ONE   |</code>
</div>
<div class="line number6 index5 alt1" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;font-size:13px;color:rgb(51,51,51);border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;background-image:none;">
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">|  2 | TWO   |</code>
</div>
<div class="line number7 index6 alt2" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;font-size:13px;color:rgb(51,51,51);border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;background-image:none;">
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">|  3 | THREE |</code>
</div>
<div class="line number8 index7 alt1" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;font-size:13px;color:rgb(51,51,51);border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;background-image:none;">
  <code class="sql plain" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,0,0);background:none;">&#43;</code>
  <code class="sql comments" style="font-family:Monaco, Menlo, Consolas, &#39;Courier New&#39;, monospace;border:0px;line-height:1.1em;vertical-align:baseline;min-height:auto;color:rgb(0,130,0);background:none;">----&#43;-------&#43;</code>
</div>
<div class="line number9 index8 alt2" style="font-family:Monaco, Me
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP