How to Insert Forward Slash SQL in Oracle

Written by ginny putscher
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Insert Forward Slash SQL in Oracle
Rerun a Query in SQL*Plus. (Kutay Tanir/Photodisc/Getty Images)

When working with SQL, or the structured query language to access or manipulate an Oracle database, a forward slash character is a sound and resourceful command. The forward slash can be a valid alternative and replace the semicolon to terminate a SQL statement. The forward slash is also very effective when using temporary variables in a SQL query.

Skill level:
Easy

Other People Are Reading

Instructions

  1. 1

    Connect and Login to Oracle SQL*Plus.

  2. 2

    Click "Start," "All Programs" and "SQLPlus." Once the Oracle SQL*Plus Dialog Box appears, enter your Username and Password, then click "OK."

  3. 3

    Use and Terminate a SQL statement using the forward slash character. At the SQL prompt, the type

    " select customer_id, first_name, last_name

    from customers

    where customer_id = 1

    ;"

  4. 4

    Run a SQL statement that is stored in the buffer. AT the SQL prompt, Type " (/) the ampersand."

    SQL> /

  5. 5

    Define and run a temporary variable and then rerun the query using the forward slash character. At the SQL prompt, enter in the SELECT statement shown below:

    "SELECT customer_id, first_name, last_name

    FROM customers

    WHERE customer_id = &customer_id_var;"

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.