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!

SQL Code Highlighting

Discussion in 'Site Announcements and Feedback' started by Sadik, Apr 4, 2009.

  1. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    A new feature has been implemented at Club-Oracle which will allow syntax highlighting and line numbering for SQL Code. Let me demonstrate with an example.

    [ Highlight=sql ]
    select * from emp
    where emp_id in (5,7)
    and emp_location = 'India'
    [ /Highlight ]

    Gives the following result (without the spaces)

    Code (SQL):
    SELECT * FROM emp
    WHERE emp_id IN (5,7)
    AND emp_location = 'India'
    There is a new SQL Button on the reply editor which will put the Highlight Tag automatically if you select the code and click on the Button.

    If you don't want syntax highlighting, you can use the old [ CODE ] Blocks as usual.

    Cheers! :)
     
  2. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    hmmm looks good

    Testing...

    Code (SQL):
    SELECT 'TYRO' FROM dual
     
  3. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    Its a nice feature. good..

    I tried it already .
     
  4. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    Hi, modified the feature slighlty to remove the line numbering as it was causing a problem when copying someone's code. One had to delete the line numbers then. So removed it.