A declaratory judgment is one of the categories in which the general legal action of a judgment, as the final decision made by a court in the process of hearing a lawsuit, can be placed. In this specific instance, the declaratory judgment can be distinguished from other kinds of judgments in that it has bearing on both the rights and duties possessed by participants in the suit, instead of in terms of ordering the participants to perform certain kinds of actions.
That being said, while a declaratory judgment is not considered to be as actively binding as other kinds of judgments, it can be distinguished from the otherwise similar legal action of a court-issued advisory opinion in that it does possess legal authority over the suit, if not to the same extent over the participants in the suit.
A declaratory judgment could also be issued outside of the specific legal setting of a courtroom, such as by a governmental agency which possesses some form of judicial authority, in which case it might instead be referred to as a declaratory ruling. Moreover, a declaratory judgment might be accompanied, in the event that it is issued by a court, by such additional legal actions as injunctions or decisions on the obligations of one party to pay damages to the other.
A declaratory judgment might be sought prior to the issuing of a lawsuit which is being anticipated, or in anticipation of a conflict occurring between legal and contract rights during lawsuits.