qu.3

来自「linux 下用c++ 开发的一个小型数据库系统」· 3 代码 · 共 38 行

3
38
字号
/* * test 3 tests QU_Join *//* create relations */create table soaps(soapid int, name char(28), network char(4), rating real);load table soaps from ("../data/soaps.data");create table stars(starid int, real_name char(20), plays char(12), soapid int);load table stars from ("../data/stars.data");select soapid,name from soaps;select starid,real_name,plays,soapid from stars;/* print names of stars and the soaps they star in */select stars.plays, soaps.name from stars, soaps where stars.soapid = soaps.soapid;/* another query */select soaps.name, stars.starid from stars, soaps  where soaps.name = stars.real_name;/* * a multi-step query *//* names and id's of NBC stars with id's >= 9 */select real_name, starid, soapid into temp1from starswhere starid >= 9;select temp1.real_name, temp1.starid, soaps.network into temp2 from temp1,soapswhere temp1.soapid = soaps.soapid;select real_name, starid, networkfrom temp2where network = "NBC";

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?