1

I want to get the value SESSIONID from this table:

CREATE TABLE SESSIONSLOG(
  SESSIONID VARCHAR2(30 ) NOT NULL,
  USERNAME VARCHAR2(30 ),
  IPADDRESS VARCHAR2(30 ),
  LOGINTIME TIMESTAMP(6),
  LOGOUTTIME TIMESTAMP(6)
)
/

I tried this SQL query:

SELECT SESSIONID FROM ACTIVESESSIONSLOG

But I get this error message:

ORA-00904: "SESSIONID": invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:
Error at Line: 1 Column: 7

How I can fix this?

3 Answers 3

3

You're querying the wrong table:

CREATE TABLE SESSIONSLOG

...

SELECT SESSIONID FROM ACTIVESESSIONSLOG

ACTIVESESSIONSLOG is not the same as SESSIONSLOG.

Sign up to request clarification or add additional context in comments.

Comments

2

You are querying wrong table ... table should be SESSIONSLOG

SELECT SESSIONID FROM SESSIONSLOG

Comments

1

@user1285928 you are not supposed to use " ACTIVESESSIONSLOG " .

Instead Use SESSIONSLOG. Also use the delimiter symbol ;

SELECT SESSIONID FROM SESSIONSLOG;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.