Which command is used to connect to a database in DB2 ? Give the Syntax.



Which command is used to connect to a database in DB2 ? Give the Syntax...

Answer / Anupam Shukla

To connect to a DB2 database using the command line, you can use the `db2 connect` command. The syntax would look like this: `db2 connect to <database> user <username> using <password>`. For connecting through SQL, you can use the `CONNECT` statement in your SQL script.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is correlation names?

1 Answers  


how to resolve -805 . how to see dbrm and package not found

2 Answers   IBM,


What is innodb buffer pool?

1 Answers  


How to check sequence on a table in db2?

1 Answers  


Explain about dbrm.

1 Answers  


What is the maximum size of varchar data type in db2?

1 Answers  


Why do we use cursor?

1 Answers  


How to handle null values in db2

4 Answers  


Lot of updates have been done on a table due to which indexes have gone haywire. What do you do?

2 Answers  


Q4. How will you get the count of record without using COUNT verb in query?

2 Answers   IBM,


Select empno, sal from emptbl where empno < 101.By this query can we fetch first 100 recs? where empno is primary key.It won't throw -811 error? if it wont,then what is use of cursor technique while fetching first 100 recs. Please need more clarification.

2 Answers  


DB2: A calls B once sucessfull and second time when it calls says curson is open why is it so?

1 Answers   IBM,


Categories