Console - DISPLAYS RECORD

Displays details on the given record from the last returned result-set.

Syntax

  1. DISPLAY RECORD <record-number>
  • <record-number> Defines the relative position of the record in the last result-set.

Example

  • Query the database on the class Person to generate a result-set:

    1. orientdb> SELECT FROM Person
    2.  
    3. ---+-----+--------+----------+-----------+-----------+------
    4. # | RID | PARENT | CHILDREN | NAME | SURNAME | City
    5. ---+-----+--------+----------+-----------+-----------+------
    6. 0 | 5:0 | null | null | Giuseppe | Garibaldi | -6:0
    7. 1 | 5:1 | 5:0 | null | Napoleon | Bonaparte | -6:0
    8. 2 | 5:2 | 5:3 | null | Nicholas | Churchill | -6:1
    9. 3 | 5:3 | 5:2 | null | Winston | Churchill | -6:1
    10. 4 | 5:4 | null | [2] | Barack | Obama | -6:2
    11. 5 | 5:5 | 5:4 | null | Malia Ann | Obama | null
    12. 6 | 5:6 | 5:4 | null | Natasha | Obama | null
    13. ---+-----+--------+----------+-----------+-----------+------
    14. 7 item(s) found. Query executed in 0.038 sec(s).
  • With the result-set ready, display record number four in the result-set, (for Malia Ann Obama):

    1. orientdb> DISPLAY RECORD 5
    2.  
    3. ------------------------------------------------------------------------
    4. Class: Person id: 5:5 v.0
    5. ------------------------------------------------------------------------
    6. parent : Person@5:4{parent:null,children:[Person@5:5, Person@5:6],
    7. name:Barack,surname:Obama,city:City@-6:2}
    8. children : null
    9. name : Malia Ann
    10. surname : Obama
    11. city : null
    12. ------------------------------------------------------------------------

For more information on other commands, see Console Commands.