SQL Syntax color code



  • Hi All,

    Whenever I copy and paste SQL Code from SQL IDE to Notepad++ I see that the entire code/text font color is black

    what I am looking for is to have the font color according to the SQL syntax code( keywords in different color, comments in different color) just like the way you see in any of the IDE’s

    Can you let me know how can I change my settings

    Thanks



  • @pawan-rakesh ,

    If you start with a new/empty tab in Notepad++, it will default to being plain-text / normal text / no styling (you can see this on your status bar in the lower-left corner if your window is wide enough, or by looking at the Language menu and seeing that ● None (Normal Text) is selected). Pasting text which happens to be SQL into the window is not enough to tell Notepad++ that it’s SQL. You have to somehow tell Notepad++ that you’re pasting in SQL. One way is to save the file with the sql extension (like blah.sql). Another way is to go to Language > S > SQL



  • I said,

    If you start with a new/empty tab in Notepad++, it will default to being plain-text

    BTW: if you are editing more SQL than any other type of file, you might want to change your default syntax highlighter: The Settings > Preferences > New Document has a Default language pulldown; if you change that to SQL, then every new empty file new # (from a File > New or starting a new instance of Notepad++ with no session) will default to SQL instead of normal text.



  • @PeterJones Thank you, it worked