inh.sql.out
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:3k
- QUERY: create table person (name text, age int4, location point);
- QUERY: create table man () inherits(person);
- QUERY: create table emp (salary int4, manager char16) inherits(person);
- QUERY: create table student (gpa float8) inherits (person);
- QUERY: create table stud_emp (percent int4) inherits (emp, student);
- QUERY: create table female_stud_emp () inherits(stud_emp);
- QUERY: select * from person;
- name age location
- ----- ---- ---------
- QUERY: select * from man;
- name age location
- ----- ---- ---------
- QUERY: select * from emp;
- name age location salary manager
- ----- ---- --------- ------- --------
- QUERY: select * from student;
- name age location gpa
- ----- ---- --------- ----
- QUERY: select * from stud_emp;
- name age location salary manager gpa percent
- ----- ---- --------- ------- -------- ---- --------
- QUERY: select * from female_stud_emp;
- name age location salary manager gpa percent
- ----- ---- --------- ------- -------- ---- --------
- QUERY: insert into person values ('andy', 14, '(1,1)');
- QUERY: insert into emp values ('betty', 20, '(2, 1)', 1000, 'mandy');
- QUERY: insert into student values ('cy', 45, '(3, 2)', 1.9);
- QUERY: insert into stud_emp values ('danny', 19, '(3.3, 4.55)', 400, 'mandy', 3.9);
- QUERY: insert into man values ('fred', 2, '(0, 0)');
- QUERY: insert into female_stud_emp values ('gina', 16, '(10, 10)', 500, 'mandy', 3.0);
- QUERY: select * from person;
- name age location
- ----- ---- ---------
- andy 14 (1,1)
- QUERY: select * from emp;
- name age location salary manager
- ------ ---- --------- ------- --------
- betty 20 (2,1) 1000 mandy
- QUERY: select * from student;
- name age location gpa
- ----- ---- --------- ----
- cy 45 (3,2) 1.9
- QUERY: select * from stud_emp;
- name age location salary manager gpa percent
- ------ ---- ----------- ------- -------- ---- --------
- danny 19 (3.3,4.55) 400 mandy 3.9
- QUERY: select * from man;
- name age location
- ----- ---- ---------
- fred 2 (0,0)
- QUERY: select * from female_stud_emp;
- name age location salary manager gpa percent
- ----- ---- --------- ------- -------- ---- --------
- gina 16 (10,10) 500 mandy 3
- QUERY: select * from person*;
- name age location
- ------ ---- -----------
- andy 14 (1,1)
- fred 2 (0,0)
- betty 20 (2,1)
- cy 45 (3,2)
- danny 19 (3.3,4.55)
- gina 16 (10,10)
- QUERY: select * from emp*;
- name age location salary manager
- ------ ---- ----------- ------- --------
- betty 20 (2,1) 1000 mandy
- danny 19 (3.3,4.55) 400 mandy
- gina 16 (10,10) 500 mandy
- QUERY: select * from student*;
- name age location gpa
- ------ ---- ----------- ----
- cy 45 (3,2) 1.9
- danny 19 (3.3,4.55) 3.9
- gina 16 (10,10) 3
- QUERY: select * from stud_emp*;
- name age location salary manager gpa percent
- ------ ---- ----------- ------- -------- ---- --------
- danny 19 (3.3,4.55) 400 mandy 3.9
- gina 16 (10,10) 500 mandy 3
- QUERY: drop table female_stud_emp;
- QUERY: drop table stud_emp;
- QUERY: drop table student;
- QUERY: drop table emp;
- QUERY: drop table man;
- QUERY: drop table person;