Skip to Main Content
SQL Empowerment in Oracle Database 23ai: Leveraging Domains and Features

About This Workshop

Youtube Video

About This Workshop
The SQL domain functionality is a very powerful new "tool" for application development in 23ai. In general SQL domains allow users to declare the intended usage for columns with a separate data dictionary objects so that abstract domain specific knowledge can be easily reused. You can use them to provide additional information to a stored column and you can define and validate data with them. Not only relational columns can be validated but also JSON data with the new VALIDATE clause. Like other database objects it can be created, dropped and altered. With it you have the freedom to change the validation logic or information without changing the table definition.


A SQL domain is a dictionary object that belongs to a schema and encapsulates a set of optional properties and constraints for common values. SQL domains provide constraints, display, ordering and annotations attributes. After you define a SQL domain, you can define table columns to be associated with that domain, thereby explicitly applying the domain's optional properties and constraints to those columns. So SQL domains are used to provide additional information to a stored column (JSON or relational), and therefore, used to define and validate data.

You can create, alter and drop a domain in your own schema. To work with domains, you require the privilege CREATE DOMAIN.

There are 3 different types of domains: single column, multi column and flexible domains. In addition there are also built-in domains that you may use.

We then present 10 Oracle Database 23ai features:
- Aliases in GROUP BY clause
- FROM clause - now optional
- Boolean for SQL
- IF [NOT] EXISTS DDL clause
- New table value constructor
- Multivalue INSERTs
- RETURNING clause of UPDATE and MERGE statement
- Joins in UPDATE and DELETE
- Annotations
- New metadata for database objects
- "Light weight object types" with SQL Domains

Workshop Info

30 minutes
  • Power Up with 23ai SQL Features
  • Familiarity with SQL is desirable, but not required
  • Some understanding of database terms is helpful

Other Workshops you might like