How to compare OPEN-SQL – SELECT and INTERNAL TABLE READ Query

Ztt_db_table2 is the table name

PARAMETEROPEN-SQL – SELECTINTERNAL TABLE – READ, Table expressions, LOOP AT
SINGLE RECORDSELECT SINGLE * FROM ztt_db_table2 INTO ls_contacta) READ TABLE lt_contact INDEX 1 INTO ls_contact.

b) READ TABLE lt_contact WITH KEY contact_id = 101 INTO ls_contact.

c) DATA lt_contact TYPE TABLE OF ztt_db_table2 WITH NON-UNIQUE KEY contact_id.

READ TABLE lt_contact WITH TABLE KEY contact_id = 102 INTO ls_contact.

d) READ TABLE lt_contact TRANSPORTING NO FIELDS WITH KEY contact_id = 101

e) ls_contact = lt_contact[ 1 ]

f) ASSIGN lt_contact[ contact_id = 101 ] TO FIELD-SYMBOL(<ls_contact>).

g) DATA lt_sorted_table TYPE SORTED TABLE OF ztt_db_table2 WITH UNIQUE KEY contact_id.

ls_sorted_contact = lt_sorted_contact[ KEY primary_key COMPONENTS contact_id = 101 ]
READING MORE RECORDSa) SELECT * FROM ztt_db_table2 INTO TABLE lt_contact

b) SELECT * FROM ztt_db_table2 APPENDING TABLE lt_contact

c) SELECT * FROM ztt_db_table2 INTO TABLE lt_contact UPTO 5 ROWS.

d) SELECT DISTINCT * FROM ztt_db_table2 INTO TABLE lt_contact

e) SELECT * FROM ztt_db_table2 INTO ls_contact.

ENDSELECT.
LOOP AT lt_contact ASSIGNING FIELD-SYMBOL(<ls_contact>) FROM 1 TO 2 WHERE contact_id = 102.

WRITE:/ <ls_contact>-contact_id.

ENDLOOP.