%createdb itdb %psql -d itdb -U ta05001;
データベース itdb を作り、itdb に作成者として接続
itdb=# create table character (name text, program text, sex text, character text); CREATE TABLE itdb=# create table town (name text, town text, hobby text); CREATE TABLE itdb=# create table story (program text, abstract text); CREATE TABLE itdb=# create table marathon (name text, rank integer); CREATE TABLE itdb=# create table hundred (name text, rank integer); CREATE TABLE itdb=# create table shop(id integer, shop text, address text); CREATE TABLE itdb=# create table item(id integer, item text, color text, stock integer); CREATE TABLE itdb=# copy character from '/home/irhome/c105/madoka/public_html/2011/dat/character.csv' DELIMITER ','; COPY 9 itdb=# copy town from '/home/irhome/c105/madoka/public_html/2011/dat/town.csv' DELIMITER ','; COPY 7 itdb=# copy story from '/home/irhome/c105/madoka/public_html/2011/dat/story.csv' DELIMITER ','; COPY 5 itdb=# copy marathon from '/home/irhome/c105/madoka/public_html/2011/dat/marathon.csv' DELIMITER ','; COPY 5 itdb=# copy hundred from '/home/irhome/c105/madoka/public_html/2011/dat/hundred.csv' DELIMITER ','; COPY 6 itdb=# copy item from '/home/irhome/c105/madoka/public_html/2011/dat/item.csv' DELIMITER ','; COPY 3 itdb=# copy shop from '/home/irhome/c105/madoka/public_html/2011/dat/shop.csv' DELIMITER ','; COPY 2