有一个数据库表information的结构为:(ID,NAME,AGE) 1,写出sql 语句,查询10个年龄小于20的姓名

请教下,有一个数据库表information的结构为:(ID,NAME,AGE) 1,写出sql 语句,查询10个年龄小于20的姓名
最新回答
比你帅

2024-05-01 03:53:01

ORACLE:
select * from information
where age<20 and rownum<=10
select avg(age) as age_avg from information
SQLServer:
select top 10 * from information
where age<20
select avg(age) as age_avg from information
唐伯虎点蚊香

2024-05-01 02:06:47

select top 10 id,name,age from information where age < 20
烟酉

2024-05-01 11:07:13

select top 10 information.name from information where information.age < 20
几闲人

2024-05-01 10:36:46

1. select top 10 Name from information where AGE<20
2. SELECT AVG(AGE) AS AGEAvg from information
秋天の童话

2024-05-01 01:22:51

什么资料库? sqlserver的么?
select top 10 NAME from information where age<20

select avg(age) from information
追问
怎么显示 top10标识符无效呢
追答
你是什么资料库?
这个top 10只能在sql server中用
追问
是那个pl/SQL
追答
那就是oracle资料库咯?
select * from (
select rownum num ,name from information where age<20) a where num<11