Follow us: Connect on YouTube Connect on YouTube Connect on YouTube

Pages

Tuesday, 3 October 2017

Insert Data into Oracle Table By Using Column Address

Syntax:
          insert into <table_name) values (&col1, &col2, &col3 …. &coln);

     This will prompt you for the values but for every insert you have to use forward        slash.
   
Example:
            SQL>  INSERT INTO student VALUES (&no, '&name', &marks);

Enter value for no: 1
Enter value for name: Jagan
Enter value for marks: 300
old   1: insert into student values(&no, '&name', &marks)
new   1: insert into student values(1, 'Jagan', 300)
SQL> /
Enter value for no: 2
Enter value for name: Naren
Enter value for marks: 400
old   1: insert into student values(&no, '&name', &marks)
new   1: insert into student values(2, 'Naren', 400)

INSERT VALUES INTO SPECIFIED COLUMNS BY USING ADDRESS


Syntax:
          insert into <table_name)(col1, col2, col3 … coln) values (&col1, &col2, &col3 …. &coln);

     This will prompt you for the values but for every insert you have to use forward
slash.


Example:
            SQL> INSERT INTO student (no, name) VALUES (&no, '&name');

Enter value for no: 5
Enter value for name: Visu
old   1:  insert into student (no, name) values(&no, '&name')
new   1:  insert into student (no, name) values(5, 'Visu')
SQL> /
Enter value for no: 6
Enter value for name: Rattu
old   1:  insert into student (no, name) values(&no, '&name')
new   1:  insert into student (no, name) values(6, 'Rattu')

Share this article :

4 comments:

  1. Hi Dayakar,

    Zoooooooom! That’s how speedy and easy this read was! Looking forward to more of such powerful content on Insert Data into Oracle Table By Using Column Address!

    I need your help please, I am new at PL/SQL.

    I need to run a select command with multiple values, if a break down this query into 3 pieces and run them, they works perfectly, but I’ve got problems whenever I execute this query because there are multiple values into the where clause and I think it’s necessary to create lines break so it may work perfectly

    how can I get through this?

    SELECT job_name, command,description,days_of_week,start_mins,machine, J2.CREATE_STAMP, J2.MODIFY_STAMP
    FROM MDBADMIN.UJO_JOBROW JR JOIN MDBADMIN.ujo_job2 J2
    ON (JR.JOID = J2.JOID)
    WHERE job_name IN ('coscl_PM_zip_log','coscl_PM_clear_log','coscl_PM_alarma_fs','coscl_PM_pmapp1_PM_up','coscl_PM_control_recargas_cod_11','coscl_PM_control_recargas_ingreso','coscl_PM_control_rec_error_cc_agrup_v1'.'coscl_PM_control_procesos_diarios','coscl_PM_rep_recar_x_estado','coscl_PM_control_tiempos_recargas',
    'coscl_PM_control_porcentaje','coscl_PM_control_puertos_bloq','coscl_PM_control_errores', 'coscl_PM_control_java','coscl_PM_control_error_cache');
    Thank you very much and will look for more postings from you.

    Merci,
    George

    ReplyDelete
  2. Hi There,

    I learnt so much in such little time about Insert Data into Oracle Table By Using Column Address . Even a toddler could become smart reading of your amazing articles.

    I know there are a lot of website to know about hierarchical query but not getting the correct output as desired.
    I am in need to use hierarchical query:

    I have table with values

    sub_node_pk low_term_no high_term_no

    123 1 3

    342 5 7

    I need query with level being used to get as below


    level sub_node_pk

    1 123

    2 123

    3 123

    5 342

    6 342

    7 342


    Kindly help.
    I read multiple articles and watched many videos about how to use this tool - and was still confused! Your instructions were easy to understand and made the process simple.

    MuchasGracias,
    Preethi

    ReplyDelete
  3. Ni Hau,


    Hot! That was HOT! Glued to the #topic your proficiency and style!

    select name,value from v$parameters abc
    minus
    select name,value from v$parameters@test xyz
    and xyz.value >abc.abc

    Can anybody please help me above sql?


    Follow my new blog if you interested in just tag along me in any social media platforms!


    Many Thanks,

    ReplyDelete
  4. Oracle apps and Fusion Self Paced Training Videos by Industry Experts. Please Check oracleappstechnical.com

    ReplyDelete