如何在Oracle中“插入tab1值(从tab2中选择*,......)”?(How can I “insert into tab1 values (select * from tab2, …)” with Oracle?)
Insert into table1
values ((select * from table2), sysdate, 'open', Null, null);
这就是我想要的。 我该怎么写这个查询?
Insert into table1
values ((select * from table2), sysdate, 'open', Null, null);
This is what I'd like to run. How can I write this query?
原文:https://stackoverflow.com/questions/16856989
更新时间:2020-02-23 14:02
最满意答案
与VALUES子句一起使用的子查询只需返回一行。 如果查询返回多行,则可以按如下方式重写:
insert into table1 select t2.*, sysdate, 'open', null, null from table2 t2;
Subqueries used with VALUES clause are required to return only one row. If your query returns more than one row, you can rewrite it as follows:
insert into table1 select t2.*, sysdate, 'open', null, null from table2 t2;
2013-05-31
相关问答
Viewpager具有一个名为setOffScreenPageLimit()的公共方法,该方法指示在空闲状态下,视图层次结构中当前页面的任一侧将保留的页数。 当您使用setOffscreenPageLimit()的默认实现时,它只会加载它右侧的一个片段。 例如,如果您当前位于index1上,则其索引2在内存中加载,但不是索引0,因此向左滑动将从头开始加载新的片段。 使用setOffScreenLimit(1),setOffScreenLimit(2)等,它将有助于清除你对这个概念的疑惑。 View
...
在ViewPager中,您的ViewPager会加载多少个屏幕(碎片)。 您可以通过调用ViewPagers setOffscreenPageLimit方法来设置它。 但是,如果您检查ViewPagers代码 ,它会告诉您必须至少加载1个屏幕外页面: private static final int DEFAULT_OFFSCREEN_PAGES = 1;
public void setOffscreenPageLimit(int limit) {
if (limit < DEFAULT
...
UITabBarController *tabBarController = self.tabBarController;
ViewController *myVC = (ViewController *) tabBarController.viewControllers[0]; // 0 = 1st VC
是缺失的链接(由@rcasey在raywenderlich.com上提供) UITabBarController *tabBarController = self.tabBarContro
...
你只需要一些更小的东西: [type=radio]:checked ~ label ~ .content {
z-index: 1;
display: block;
}
[type=radio] ~ .content
{
display: none;
}
You just need some more minor things:
...
既然你找到了“错误”的答案,我会告诉你“正确”: #include
#include
int main()
{
std::cout << "How many lines do you want? ";
unsigned lines;
if (!(std::cin >> lines))
{
std::cout << "Invalid input\n";
return 1;
}
...
也许这样的事情: SELECT
column1
FROM
table1
WHERE
ppp=$parameter
AND EXISTS
(
SELECT
NULL
FROM
table2
WHERE
table1.ppp=table2.parameter
AND q
...
你的问题在这里: for (int k=0; count>k;k++){
if (tab[k]!=null){
for (int l=0;l
if (tab2[l]==null){
tab2[l]=tab[k];
}
}
}
}
内环不是必需的。 在外循环的第一次运行( k==0 )中,内循环将以l = 0开始,并且由于所有值都为null ,它将使用tab
...
从这个快速看看,你的tab1是否有像tab2定义的点击事件? 例: $(".tab1").click(function () {
initialize_mixitup('#your_books_image_gallery', '#yourbook_switchtogrid', '#yourbook_switchtolist', '.mix_book', '.book_sort', 'grid', '');
});
Issue resolved by replacing the conta
...
与VALUES子句一起使用的子查询只需返回一行。 如果查询返回多行,则可以按如下方式重写: insert into table1 select t2.*, sysdate, 'open', null, null from table2 t2;
Subqueries used with VALUES clause are required to return only one row. If your query returns more than one row, you can rewrite
...