How to Set default database in Teradata

For every query the database name needs to use which might not be convenient for continuous operation.


SELECT column1 FROM database1.table1;

INSERT INTO database1.table1 values(1,'');

UPDATE database1.table1 SET column1= 5;

If default database is set the we don’t need to provide the database name reputedly in the query. Using the following command default database can be set:

DATABASE <Database Name>;


DATABASE database1;

SELECT column1 FROM table1;

INSERT INTO table1 values(3,'');

UPDATE table1 SET column1= 10;