INSERT {all | first}
[when then]
into [(col1,col2,
···
)]
[values(val1,val2,
···
)]
[when then]
into [(col1,col2, ···)]
[values(val1,val2, ···)]
···
···
[when then]
into [(col1,col2, ···)]
[values(val1,val2, ···)]
[else
into
[(col1,col2, ···)]
[values (val1,val2, ···)]
]
Subquery-definition;
SQL> Create table small_orders(order_id number(12) not null,
customer_id number(6) not null,
order_total number(8,2),
sales_rep_id number(6)
);
SQL> Creat table medium_orders as select * from small_orders;
SQL> Creat table large_orders as select * from small_orders;
SQL>Create table special_orders(order id number(12) not null,
customer_id number(6),
order_total number(8,2),
sales_rep_id number(6),
credit_limit number(9,2),
cust_email varchar2(30)
);
Insert all
when ottl < 10000 then
into small_orders
when ottl > 10000 and ottl < 20000 then
into medium_orders
when ottl> 20000 then
into large_orders
when ottl>29000 then
into special_orders
select o.order_id oid, o.customer_id cid, o.order_total ottl,
o.sales_rep_id sid, c.credit_limit cl, c.cust_email cem
from orders o, customers
where o.customer_id = c.customer_id;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7356664/viewspace-509514/,如需转载,请注明出处,否则将追究法律责任。
![user_pic_default.png](http://blog.itpub.net/images/user_pic_default.png)
请登录后发表评论 登录
全部评论
<%=items[i].createtime%>
<%=items[i].content%>
<%if(items[i].items.items.length) { %>
<%for(var j=0;j
<%}%> <%if(items[i].items.total > 5) { %>
<%}%> <%}%>
<%=items[i].items.items[j].createtime%>
<%=items[i].items.items[j].username%> 回复 <%=items[i].items.items[j].tousername%>: <%=items[i].items.items[j].content%>
还有<%=items[i].items.total-5%>条评论) data-count=1 data-flag=true>点击查看
<%}%>
转载于:http://blog.itpub.net/7356664/viewspace-509514/