Directives: define and undef
EXEC SQL DEFINE name; EXEC SQL DEFINE name value; EXEC SQL UNDEF name;
/* Define a name. */ EXEC SQL DEFINE HAVE_FEATURE; /* Define constants. */ EXEC SQL DEFINE MYNUMBER 12; EXEC SQL DEFINE MYSTRING 'abc'; /* Use undef to remove a previous definition. */ EXEC SQL UNDEF MYNUMBER;
EXEC SQL DEFINE MYNUMBER 12; ... EXEC SQL UPDATE Tbl SET col = MYNUMBER;

Note that you cannot use #define for a constant that you are going to use in an embedded SQL query because in this case the embedded SQL precompiler is not able to see this declaration.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.