Subject | how to get rownum |
---|---|
Author | hz.yb |
Post date | 2016-07-28T02:49:36Z |
i want to get rownum?how to select?thanks
table:
CREATE TABLE PZ (
ID INTEGER NOT NULL,
RQ TIMESTAMP NOT NULL,
JE DECIMAL(18,2),
/* Keys */
PRIMARY KEY (ID)
);
data:
INSERT INTO PZ (ID, RQ, JE) VALUES (11, '2016-01-01 23:55:00', 84.38);
INSERT INTO PZ (ID, RQ, JE) VALUES (12, '2016-01-02 23:55:00', 37.97);
i want to get rownum(ORDER BY RQ),for example:
ROWNUM ID RQ JE
1 11 2016-01-01 23:55:00 84.38
2 12 2016-01-02 23:55:00 37.97
HOW TO SELECT?