SoFunction
Updated on 2025-04-14

1000 common fool questions for DB2 (four)



What are the permissions?
CONTROL permissions: If the user creates an object, the user can fully access the object.
The GRANT statement grants permissions to the user.
The REVOKE statement revokes a user's permission.

What are there?
CREATE
DECLARE
ALTER
DROP
wait
What are there?
INSERT
SELECT
UPDATE
DELETE
wait

118. Is there a Boolean type in DB2?
No

119. How to query DB2's built-in functions?
In-house document ADMINISTION-->SQLREFERENCE-->FUNCTIONS

120. How to execute DB2 script files?
DB2-VTFFILENAME

121.What is the ROWNUM() of ORACLE in DB2?
ROW_NUMBER()OVER()

122. How to get the description of the error code in DB2?
DB2?SQLCODE

123. Is the function of converting VARCHAR to INTEGER in DB2 as?
CAST()

124. What is the function of converting INTEGER into VARCHAR in DB2?
CHAR()

125. Is the function of converting VARCHAR to DATE in DB2?
DATE()

126. Is the function of converting DATE into VARCHAR in DB2?
CHAR()

127. Can TRIGGER in DB2 be modified?
No, only rebuild can be deleted

How to know the port number of DB2?
\WINNT\SYSTEM32\DRIVERS\ETC\SERVICES

129.How to execute stored procedures in DB2?
Can DB2CALLPROCEDURE_NAME

130. How to enter the DOS command method of DB2?
DB2CMD

131. How to get the process number of DB2?
DB2LISTAPPLICATIONS

132. How to kill the DB2 process?
FORCEAPPLICATION(ID)

After the user installs DB2, how to start DATABASE with user B?
Add in .PROFILE under B user
./HOME/DB2INST/SQLLIB/DB2PROFILE

134. What is the snapshot similar to ORACLE in DB2?