I have this Oracle table:
CREATE TABLE USERGROUPS(
GROUPID INTEGER NOT NULL,
GROUPNAME VARCHAR2(40 ),
GROUPSTATUS VARCHAR2(30 ),
DATEGROUPADDED DATE,
DATEGROUPLOCKED DATE,
GROUPEXPIREDATE DATE,
DESCRIPTION CLOB
)
/
I tried to run this SQL query:
SELECT c.*
FROM
(SELECT b.*,
rownum rn
FROM
(SELECT a.* FROM USERGROUPS a ORDER BY GROUPID ASC
) b
WHERE rownum <= 5
) c
WHERE rn > 10
I get this error message in SQL developer when I run it:
ORA-00904: "GROUPID": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error at Line: 5 Column: 25
I also tested this SQL query:
SELECT GROUPID FROM USERGROUPS
I get this error:
ORA-00904: "GROUPID": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error at Line: 1 Column: 7
Can you help me to fix the problem?