例1: 一个Customer表,一个字段Value,现请问如何查到Value中第二大的值 select max(value) from Customer where value < (select max(value) from Customer) 例2: 数据库中人表有三个属性,用户(编号,姓名,身高),查询出该身高排名第二的高度. 1.查询出没有重复值的第二名,即假如最高的身高是182,有几个人同时身高是182,则查出身高小于182的的最高的身高值. 1>.方式1: select MAX(
#include <stdio.h> int fun(int x) { int a, b, c; a = x / ; b = x % / ; c = x % ; if (x == a * a * a + b * b * b + c * c * c) ; else ; } int main() { int m; printf("1000以内的水仙花数:\n"); ; m < ; m++) { ) printf("%5d\n", m); } }
EMP表是Oracle测试账户SCOTT中的一张雇员表,首先,我们来看看emp表的数据 SQL> select * from emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ----- ---------- --------- ---------- --------- ---------- ---------- ---------- SMITH CLERK ALLEN SALESMAN WARD SALESMAN JONES MANAGER M