hylan:linux系统操作数据库

1.连接数据库

DB2:    db2 connect to sample user db2inst1 using inf0server

sample是数据库名    db2inst1是用户名    inf0server是密码

infosrvr:/home/db2inst1 # db2 connect to sample user db2inst1 using inf0server

   Database Connection Information

 Database server        = DB2/LINUX 9.7.4
 SQL authorization ID   = DB2INST1
 Local database alias   = SAMPLE


2.调用存储过程

DB2:    db2 call db2inst1.get_date"(?)"

db2inst1是数据库名    get_date是存储过程名

infosrvr:/home/db2inst1 # db2 call db2inst1.get_date"(?)"

  Value of output parameters
  --------------------------
  Parameter Name  : CDATE
  Parameter Value : 05/04/2018

  Return Status = 0


3.



猜你喜欢

转载自blog.csdn.net/t_thylan/article/details/80203430