SQL> desc tab1
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER
NAME VARCHAR2(1000)
SQL> select * from tab1;
ID NAME
---------- ---------------
1 a
2 b
3 c
SQL> select * from tab1 where id > AVG(id);
select * from tab1 where id > AVG(id)
*
ERROR at line 1:
ORA-00934: group function is not allowed here
SQL>
Run Code Online (Sandbox Code Playgroud)
错误很明显,说这是不可能的。但我不明白为什么。该查询非常有意义:
选择所有行
tab1,其id值大于平均值
它是常用的字符集之一。它代表什么?
它是某事的首字母缩写词吗?
我正在寻找结果0123.56,以下查询应该有效。
SQL> select to_number(123.56,'0999.99') from dual;
select to_number(123.56,'0999.99') from dual
*
ERROR at line 1:
ORA-01722: invalid number
SQL>
Run Code Online (Sandbox Code Playgroud)
但事实并非如此。我在这里做错了什么?
它适用于 SELECT 和 UPDATE 语句。
是否还有更多的语句可以使用?
我能够将它与 create 一起使用,但不确定是否真正考虑了该提示。
SQL> create /*+ PARALLEL */ table t1
( id number,
name varchar2(40));
Table created.
SQL>
Run Code Online (Sandbox Code Playgroud)
除了 INSERT 和 UPDATE,什么时候都考虑 PARALLEL 提示?
是否可以在创建时指定用户的 user_id?
SQL> create user user1 identified by user1;
User created.
SQL> select user_id, username from all_users where username='USER1';
USER_ID USERNAME
---------- ------------------------------
72 USER1
SQL>
Run Code Online (Sandbox Code Playgroud)
它可以是我指定的数字而不是 72 吗?
最近 Larry 在OpenWorld 的一个主题演讲中使用了它。
维基百科说
在计算机中,有时作为俚语使用:
- 有时用来指专有文件标准——“你可以检入你的数据,但你不能检出它”。
我不明白这里的意思。什么情况下会查不到数据?
来自线程Oracle 数据库中的 sys 和 system 帐户有什么区别?,我知道sys模式应该只由数据库使用。
但是管理员仍然可以更改模式的密码。
没有密码可以连接数据库吗?如果没有,即使更改了密码,它如何连接?
在 Oracle 11g 中,有没有办法通过设置标志等来告诉数据库尽可能使用并行执行,而不是对每个 SQL 语句使用 PARALLEL 提示?
我有这两种创建表格和填充行的方法。第一个使用并行(3 级)子句,所以我预计插入速度会快得多。但我对 a) 和 b) 所用的时间进行了计时,结果几乎相同。没有迹象表明方法 a) 更快,实际上在某些运行中,方法 b) 更快。
我认为 parallel 子句会并行执行插入,因此速度要快得多。我在这里缺少什么?
一种)
create table TAB1
(col0 number not null,
col1 number,
col2 number,
col3 varchar2(25)) parallel (degree 3)
storage (initial 100K next 100K pctincrease 0);
begin
for i in 1..300000 loop
insert into TAB1 values(i-1,i,300000-i,null);
end loop;
commit;
end;
/
Run Code Online (Sandbox Code Playgroud)
b)
create table TAB2
(col0 number not null,
col1 number,
col2 number,
col3 varchar2(25))
storage (initial 100K next 100K pctincrease 0);
begin
for i in 1..300000 loop
insert …Run Code Online (Sandbox Code Playgroud) 我从线程中看到哪些工具和技术构建了 Stack Exchange 网络?数据库规范是:
运行 Microsoft Windows Server 2008 Enterprise Edition x64 的数据库 SQL Server 2008 R2
虽然这并不一定意味着 Oracle 不会做这项工作,但它确实表明它不适合这部分。
它有多远?原因是什么?