1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

function in a >"cell"??

Discussion in 'SQL PL/SQL' started by monkey, Jun 6, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    Please, caj I first ask how do we call ONE PLACE in the column OR in the row (meaning, one place where there is just one data)

    f.e.:
    column A= name

    Marc
    Ann
    Jean
    Paul
    Robert...etc

    one particular place, where there is just one name, how do we call it?
    many thanks!!!
     
  2. rajenb

    rajenb Forum Expert

    Messages:
    361
    Likes Received:
    114
    Trophy Points:
    655
    Location:
    Mauritius
    Don't quite understand the request ... please provide some more explanation and example.

    You've provided a list of names, what you want to achieve with it not clear.
     
    monkey likes this.
  3. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    A "place" where I put name Marc we can define as a1, Ann a2, Jean a3...like in excell.

    But I wonder how do we name it in sql?
    for Marc, f.e. it would be sth like:

    select name from student where id=1;

    all that expression would equall a1 in excell: (just imagine an usual table in excell filled with data)

    select name from student where id=1; = a1

    Is there a shorter way to name it in sql?

    Many thanks!!!
     
  4. rajenb

    rajenb Forum Expert

    Messages:
    361
    Likes Received:
    114
    Trophy Points:
    655
    Location:
    Mauritius
    Not exactly same but you can consider Oracle having a similar concept.

    With ROWID you can do similar queries:
    - using the table's column name (SELECT column_name, ...) is equivalent to the Excel column (A..Z..AA..ZZ..)
    - ROWID = Excel row number (WHERE ROWID='xxxxxxxxxxxxx')

    Code (SQL):
    SQL> SELECT rownum, rowid, employee_id, first_name FROM employees;

        ROWNUM ROWID          EMPLOYEE_ID FIRST_NAME
    ---------- ------------------ ----------- --------------------
         1 AAAEATAAEAAAADNAAA         100 Steven
         2 AAAEATAAEAAAADNAAB         101 Neena
         3 AAAEATAAEAAAADNAAC         102 Lex
         4 AAAEATAAEAAAADNAAD         103 Alexander
         5 AAAEATAAEAAAADNAAE         104 Bruce
         6 AAAEATAAEAAAADNAAF         105 David
         7 AAAEATAAEAAAADNAAG         106 Valli
         8 AAAEATAAEAAAADNAAH         107 Diana
         9 AAAEATAAEAAAADNAAI         108 Nancy
        10 AAAEATAAEAAAADNAAJ         109 Daniel
        11 AAAEATAAEAAAADNAAK         110 John

    SQL>SELECT rownum, rowid, employee_id, first_name FROM employees WHERE rowid='AAAEATAAEAAAADNAAB';


        ROWNUM ROWID          EMPLOYEE_ID FIRST_NAME
    ---------- ------------------ ----------- --------------------
         1 AAAEATAAEAAAADNAAB         101 Neena
     
     
    monkey likes this.
  5. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    Much more cleara now!
    Imagine, we want the content of the cell with followint "coordinates":
    column name= first name
    rowid = AAAEATAAEAAAADNAAJ

    What do we have in this cell?
    The name: Daniel.
    But, how do we call this "cell" - if we do at all?

    (Imagine Stewe woudld be in a1, that way Daniel would be in a10. How is the name for a10 in sql , oracle, if any?)

    Many thanks!!!
     
  6. rajenb

    rajenb Forum Expert

    Messages:
    361
    Likes Received:
    114
    Trophy Points:
    655
    Location:
    Mauritius
    I don't think there is such a "coordinate" or "place holder" concept in Oracle.
     
    monkey likes this.
  7. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    Do I (and if so, how) declare rowid when writing create table?
    Many thanks!!!
     
  8. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
  9. rajenb

    rajenb Forum Expert

    Messages:
    361
    Likes Received:
    114
    Trophy Points:
    655
    Location:
    Mauritius
    No you don't to include it in your create statement. It's a pseudocolumn - I think we've already discussed what a pseudocolumn is.

    From Oracle:
     
    monkey likes this.