【简答题】我们还可以在一个语句中完成创建表并且将查询结果装载到这个表中。 【示例】 create table test_new as select name ,age from fq1 em where em.dt=’2019-03-11’ 从上面的案例中可以看到,新创建的这张表test_new只含有fq1表中的dt为‘2019-03-11’的name,age两个字段的信息。新表的模式是根据SELECT语句...
【单选题】公司有一个客户的数据表,此表的建立语句如下: CREATE TABLE Customers (CustomerID int NOT NULL, CustomerName varchar(50) NOT NULL, ContactName varchar(30) NULL, Phone varchar(20) NULL, Country varchar(30) NOT NULL, CONSTRAIN...
A.
SELECT Country FROM Customers GROUP BY Country HAVING COUNT (Country)>=10
B.
SELECT TOP 10 Country FROM Customers
C.
SELECT TOP 10 Country FROM Customers FROM (SELECT DISTINCT Country FROM Customers) AS X GROUP BY Country HAVING COUNT(*)>= 10
D.
SET ROWCOUNT 10 SELECT Country, COUNT (*) as “NumCountries” FROM Customers GROUP BY Country ORDER BY NumCountries, Desc