How to find the default database in Hive

0 votes

Hi. I am new to Hive and I was going through the commands. While reading about the USE command I saw 2 usage.

  1. USE database_name;
  2. USE DEFAULT;

My question is that when I use the default database, how will I know which database I am using? Is there a way to know which is the default database?

May 20, 2019 in Big Data Hadoop by Mahi
4,772 views

1 answer to this question.

0 votes

Yes, you can find out which database is the default database. For that, you will first, change to the default database:

USE DEFAULT;

and then display the current database:

SELECT current_database()
answered May 20, 2019 by Shiro

Related Questions In Big Data Hadoop

0 votes
1 answer

How to find the used cache in HDFS

hdfs dfsadmin -report This command tells fs ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,500 views
0 votes
1 answer

Hadoop Hive: How to skip the first line of csv while loading in hive table?

You can try this: CREATE TABLE temp ...READ MORE

answered Nov 8, 2018 in Big Data Hadoop by Omkar
• 69,220 points
8,999 views
0 votes
1 answer

Hadoop: How to get the column name along with the output in Hive?

You can get the column names by ...READ MORE

answered Nov 21, 2018 in Big Data Hadoop by Omkar
• 69,220 points
4,914 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,077 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,575 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
109,073 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,642 views
0 votes
1 answer

How to configure the metastore service to communicate with the MySQL database in Hive?

Hey, This step shows the configuration properties you ...READ MORE

answered May 29, 2019 in Big Data Hadoop by Gitika
• 65,770 points
758 views
0 votes
1 answer

How to compress output of the mapreduce output in Hive?

To compress the output of the MapReduce ...READ MORE

answered May 20, 2019 in Big Data Hadoop by Hiran
1,235 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP