启动DB2
- david@david-VirtualBox:~$ db2start
- SQL1063N DB2START processing was successful.
- david@david-VirtualBox:~$
创建数据库
- david@david-VirtualBox:~$ db2 get instance
- The current database manager instance is: david
- david@david-VirtualBox:~$
连接数据库
- david@david-VirtualBox:~$ db2 "create db test"
- DB20000I The CREATE DATABASE command completed successfully.
创建table
- david@david-VirtualBox:~/sqllib$ db2 "create table tb1(id integer not null,name char(10))"
- DB20000I The SQL command completed successfully.