The answer depends on:
- the database you want to read from
- the access-methods defined by the maintainer of the database
- the sas access-modules you can use
Assuming that you want to read from mysql/maria:
libname source mysql <options to connect to the database>;
After successful execution you can process the tables using the same tools you normally use when working with datasets.
BUT: You need AccessTo MySQL licenced and installed at your site to do so.