Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)

Is it possible to put comments in SOQL?

The Force.com explorer doesn't support basic operations like undo/redo and I can't find any way to enter comments so experimenting with queries is painful.

I've tried all the usual suspects --, #, /*, //

2 Answers

+1 vote
by (32.1k points)
edited by

There is currently no way to use comments in SOQL. Although, it possible to comment out pieces of queries that have been issued in Apex.

But there are a few tools which might be helpful for you as compared to the official Flash-based Explorer and Eclipse IDE.

Some of which are:

Real Force Explorer

Brain Engine

Workbench

JitterBit Data Loader

Do you want to build a career in Salesforce? Enroll in this Salesforce training course to start your journey!

0 votes
by (1.8k points)

SOQL does not natively support comments as SQL does. However, in Apex code, you can comment out embedded SOQL queries. You might also want to evaluate alternative tools to increase the efficiency of query management. Real Force Explorer, Brain Engine, Workbench, or JitterBit Data Loader tools provide much more functionality in terms of executing queries and working with data than what Flash-based Force.com Explorer or Eclipse IDE offer. Although direct comments within SOQL are not enabled, these tools will make the process of testing and debugging queries much simpler. You can create comments by keeping your queries external to some text editor or IDE, and before running it into Salesforce, manage it over there.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...