Ultimate Sidebar

What Is SQL Syntax Highlighting?

104 41

    Code Reading

    • Programming in any language involves reading as well as writing code. Whether you're working with someone else's code or code you wrote yourself, there will be times when you will be struggling to make sense of it. Programming and scripting code in languages such as SQL is very different to natural language. When you look at a section of SQL code, it is likely that you only need to focus on certain elements. SQL highlighting makes it easier to see the overall structures at work within a script. Viewing SQL code in an editor that does not highlight it can make the development process slower and ultimately more error prone.

    SQL Code

    • When you view highlighted SQL code, you see that elements appear in varied text colors. You may also see certain code excerpts in bold and italic text, depending on the editing program you are using. SQL statements are typically made up of SQL code commands and data items. When you use SQL to query a database for example, you may use query statements like the following example:

      SELECT * from customer;

      Each item in this statement may appear differently when highlighted, as commands and data items, such as the table name, are generally presented in distinct ways.

    Purpose

    • The main purpose in using a syntax highlighting editor is to aid the development process. Languages like SQL are designed to provide a level of abstraction between the programmer and the underlying implementation within a database system. Programming and scripting languages may be primarily for issuing instructions to a computing system, but it is vital that developers can also read and understand them, so that they can carry out development work. Developers do not generally write a script once and then never look at it again -- the development process tends to be an iterative, ongoing one.

    Programs

    • Various programs can highlight SQL code. If you are using an Integrated Development Environment such as Eclipse for your projects, the code editor within it will highlight your SQL code. Alternatively, if you are developing SQL scripts independently of an IDE, you can use a standalone text editor to highlight your scripts. Notepad++ on Windows, TextMate on Mac and gedit on Linux can all handle SQL files.

Source: ...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.