YES is not a reserved keyword in the SQL language itself. Instead, it is a string value defined by the SQL standard’s INFORMATION_SCHEMA views. Many metadata columns that describe a boolean capability (nullable, updatable, insertable, etc.) return the literal strings YES or NO instead of using a BOOLEAN data type. Because the columns are declared as CHARACTER or VARCHAR, the database engine treats YES like any other string, so it must be quoted in predicates. The presence of YES indicates that the property in question applies: a column can accept NULLs, a table is insert-able, or a view is updatable. The exact set of metadata columns using YES/NO varies by database, but the semantics remain the same. YES is read-only metadata; you cannot assign it directly to alter behavior. Attempting to use YES as an unquoted identifier or constant in DML statements will raise an error in most dialects. When filtering metadata, always compare against the string 'YES' (case insensitive in most systems) and remember that it represents informational state, not a true boolean type.
SQL NO, INFORMATION_SCHEMA, BOOLEAN, IS_NULLABLE, IS_UPDATABLE
SQL-92 (initial INFORMATION_SCHEMA definition)
YES signifies that the metadata condition is true. For instance, IS_NULLABLE = 'YES' signals the column can store NULL values.
No. It is simply a string literal used in metadata views. You must quote it when using it in predicates.
Generally no. Most dialects do not treat YES as a boolean literal, so WHERE active = YES will fail. Use TRUE or 1 depending on the database.
The SQL-92 standard defined metadata columns as character strings for maximum portability. Many engines kept that design for backward compatibility.