How to Set default database in Teradata

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

Example:

SELECT column1 FROM database1.table1;

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

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>;

Example:

DATABASE database1;

SELECT column1 FROM table1;

INSERT INTO table1 values(3,'www.nazmulhuda.info');

UPDATE table1 SET column1= 10;