如何在 Oracle Apex 中获取当前 user_id
How to get current user_id in Oracle Apex
我有tableusers
;有列 (id, first_name, last_name)
.
我想为登录的用户显示 last_name||','||first_name
和 return id
。
我怎样才能做到这一点?
提前致谢
这取决于您如何称呼“ID
”以及您在其中存储的内容。
基本上,您必须有一个包含连接到您的 Apex 应用程序的用户的 用户名 的列。假设它是您 table:
中的一个新列
create table users
(id number,
first_name varchar2(20),
last_name varchar2(20),
--
username varchar2(20) --> this
);
然后你可以通过:APP_USER
引用为
select last_name ||', '|| first_name
from users
where username = :APP_USER;
:APP_USER
值是您在 Apex 右上角看到的,您的 用户名。如果你知道,你可以从 users
table.
中获取任何你想要的东西
我有tableusers
;有列 (id, first_name, last_name)
.
我想为登录的用户显示 last_name||','||first_name
和 return id
。
我怎样才能做到这一点?
提前致谢
这取决于您如何称呼“ID
”以及您在其中存储的内容。
基本上,您必须有一个包含连接到您的 Apex 应用程序的用户的 用户名 的列。假设它是您 table:
中的一个新列create table users
(id number,
first_name varchar2(20),
last_name varchar2(20),
--
username varchar2(20) --> this
);
然后你可以通过:APP_USER
引用为
select last_name ||', '|| first_name
from users
where username = :APP_USER;
:APP_USER
值是您在 Apex 右上角看到的,您的 用户名。如果你知道,你可以从 users
table.