All docs This doc
Use the following query syntax to create a table in the Spark environment, using data from a relation provider class. A relation provider builds the connection from Spark to any external database. For example, the following query creates a table in the Spark environment using the Spark JDBC provider connecting to a H2 database.
CREATE TEMPORARY TABLE foo USING jdbc OPTIONS (url "jdbc:h2:mem:testdb0", dbtable "TEST.PEOPLE", user "testUser", password "testPass" );
For more information on the options that can be used with the Spark JDBC relation provider, see Spark SQL and DataFrame Guide.
Specify the options in key value pairs separated by commas, and give the values within quotation marks.