The first step in creating a query layer in ArcGIS is to make a connection to the database you want to query. You can do this from the Project pane, as explained in Database connections in ArcGIS Pro. Alternatively, you can connect from the query layer interface, as described below:
Add Data button on the Map ribbon and select the Query Layer button from the drop-down list.
This will open the New Query Layer dialog box.
- Choose an existing connection or create a connection to the database.
- To create a new database connection, click the new database connection button and the Database Connection dialog box opens. Provide connection information as described in Database connections in ArcGIS Pro and click OK to create the new connection.
- To use an existing connection, select the connection from the drop-down list.
You are now connected to the database you chose, and the tables that can be used in your query layer appear in the List of Tables. You are ready to create a query layer.