⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qu.1

📁 linux 下用c++ 开发的一个小型数据库系统
💻 1
字号:
/* * test 1 tests QU_Select without indices *//* 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");/* * various selections without indices *//* simple selection (should be the same as just printing the relation) */select soapid, name, network, rating from soaps;print table soaps;/* names, ratings, and networks of soaps on NBC */select name, rating, network from soaps where network = "NBC";/* print character name, real name, and ids of stars with id's < 12 */select plays, real_name, starid from stars where starid < 12;/* ratings, networks, and names of soaps with ratings of 5 or greater */select rating, network, name from soaps where rating >= 5.0;/* selection that doesn't find anything */select real_name, starid from stars where starid > 567;/* select into a non-existent relation */select network, soapid, name into nedfrom soapswhere network = "CBS";print table ned;/* select into a existing relation */select network, soapid, name into nedfrom soapswhere network = "NBC";print table ned;/* select into a relation with strings of different sizes */create table ted (plays char(12), soapid int);select plays, soapid into ted from stars where plays < "L";print table ted;

⌨️ 快捷键说明

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