Supported by
Supported by Inetum

SELECT... ...ORDER BY PRIMARY KEY

images/thumbnail.jpg - Thumbnail

Although I have been using ABAP since 1998, I learn new features or options every week, and sometimes even new commands. It’s hard to believe.

Today, I’ll share a little SQL option that I recently discovered.

SELECT * FROM T001
INTO TABLE T_T001
ORDER BY PRIMARY KEY.

I have known SELECT, FROM, INTO, TABLE and even ORDER BY for a long time. I just didn’t know of PRIMARY KEY.

It orders the internal table by its key. Convenient.

Greetings from Abapinho.