启动DB2
  1. david@david-VirtualBox:~$ db2start
  2. SQL1063N DB2START processing was successful.
  3. david@david-VirtualBox:~$

创建数据库

  1. david@david-VirtualBox:~$ db2 get instance

  2.  The current database manager instance is: david

  3. david@david-VirtualBox:~$

连接数据库

  1. david@david-VirtualBox:~$ db2 "create db test"
  2. DB20000I The CREATE DATABASE command completed successfully.

创建table

  1. david@david-VirtualBox:~/sqllib$ db2 "create table tb1(id integer not null,name char(10))"
  2. DB20000I The SQL command completed successfully.
01-09 14:57