将表结构为(职工号,姓名,工资)的表Employee中工资最多的前3名记录存储到文本文件Em_text,正确的SQL命令是

admin2015-08-25  35

问题 将表结构为(职工号,姓名,工资)的表Employee中工资最多的前3名记录存储到文本文件Em_text,正确的SQL命令是

选项 A、SELECT * TOP 3 FROM Employee INTO FILE Em_text ORDER BY 工资
B、SELECT * TOP 3 FROM Employee TO FILE Em_text ORDER BY 工资
C、SELECT * TOP 3 FROM Employee INTO FILE Em_text ORDER BY 工资 DESC
D、SELECT * TOP 3 FROM Employee TO FILE Em_text ORDER BY 工资 DESC

答案D

解析 TOP短语可以查询满足条件的前几个记录,其命令格式为:SELECT TOP 数字 [PERCENT],本题查询表Employee中工资最多的前3名记录,对应的命令应为SELECT * TOP 3 FROM Employee。此外,要将结果存储到指定.TXT文件中,可在查询语句的尾部添加TO FILE <文本文件名> [ADDITIVE]命令。
转载请注明原文地址:https://jikaoti.com/ti/h4v0FFFM
0

最新回复(0)