This topic contains 0 replies, has 1 voice, and was last updated by  Avikumar 2 years, 3 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1267 Reply

    Avikumar
    Participant

    Create Database Statement:

    Create Database is a statement used to create a database in Hive. A database in Hive is a namespace or a collection of tables. The syntax for this statement is as follows:

    CREATE DATABASE|SCHEMA [IF NOT EXISTS] <database name>

    Here, IF NOT EXISTS is an optional clause, which notifies the user that a database with the same name already exists. We can use SCHEMA in place of DATABASE in this command. The following query is executed to create a database named userdb:

    hive> CREATE DATABASE [IF NOT EXISTS] userdb;
    or

    hive> CREATE SCHEMA userdb;
    The following query is used to verify a databases list:

    hive> SHOW DATABASES;
    default
    userdb

Viewing 1 post (of 1 total)
Reply To: Hive
Your information:




cf22

Your Name (required)

Your Email (required)

Subject

Phone No

Your Message

Cart

  • No products in the cart.