在SQL Server2008的查询编辑器中运行下面的语句,得到的结果是( )。create table numbers(n1 int, n2 numeric(5,0), n3 numeric(4,2))go insert numbers values(1.5,1.5,1.5)select * from numbers A 返回2,2和1.50的记录集B 返回1,2和1.50的记录集C 返回1.5,1.5和1.5的记录集D create table 命令不会执行,因为无法将列n2的精度设置为0

在SQL Server2008的查询编辑器中运行下面的语句,得到的结果是( )。create table numbers(n1 int, n2 numeric(5,0), n3 numeric(4,2))go insert numbers values(1.5,1.5,1.5)select * from numbers

A 返回2,2和1.50的记录集

B 返回1,2和1.50的记录集

C 返回1.5,1.5和1.5的记录集

D create table 命令不会执行,因为无法将列n2的精度设置为0


相关考题:

为使下列代码正常运行,应该在下划线处填入的选项是int〔〕numbers=new int[n];for(Int i=0;i numbers.____;i++)numbers[i]=i+1;A.sizeB.lengthC.dimensionD.measurement

下列代码的执行结果是______。int numbers[]=new int[6];for(int i=1;i<numbers.length;i++){numbers[i]=i-1;System.out.print(numbers[i]+"");}A) 0 1 2 3 4 5B) 1 2 3 4 5 6C) 0 1 2 3 4D) 1 2 3 4 5A.B.C.D.

为使下列代码正常运行,应该在下画线处填入的选 项是( )。 int[]numbers=new int[n]; for(int i=0;inumbers. ;i++) numbers[i]=i+1:A.sizeB.lengthC.dimensionD.measurement

如果学生表STUDENT是使用下面的SQL语句创建的CREATE TABLE STUDENT(SNO C(4) PRIMARY KEY NOT NULL,;SN C(8),;SEX C(2),;AGE N(2) CHECK(AGE>15 AND AGE<30))下面的SQL语句中可以正确执行的是A.INSERT INTO STUDENT(SNO,SEX,AGE)VALUES (“S9”,“男”,17)B.INSERT INTO STUDENT(SN,SEX,AGE)VALUES (“李安琦”,“男”,20)C.INSERT INTO STUDENT(SEX,AGE)VALUES (“男”,20)D.INSERT INTO STUDENT(SNO,SN)VALUES (“S9”,“安琦”,16)

oracle关联查询题目1数据库中有3 个表 teacher 表,student 表,tea_stu 关系表。teacher 表 teaID name agestudent 表 stuID name ageteacher_student 表 teaID stuID要求用一条sql 查询出这样的结果1.显示的字段要有老师name, age 每个老师所带的学生人数2 只列出老师age 为40 以下学生age 为12 以上的记录预备知识:1.sql 语句是对每一条记录依次处理,条件为真则执行动作(select,insert,delete,update)2.只要是迪卡尔积,就会产生“垃圾”信息,所以,只要迪卡尔积了,我们首先就要想到清除“垃圾”信息实验准备:drop table if exists tea_stu;drop table if exists teacher;drop table if exists student;create table teacher(teaID int primary key,name varchar(50),age int);create table student(stuID int primary key,name varchar(50),age int);create table tea_stu(teaID int references teacher(teaID),stuID int references student(stuID));insert into teacher values(1,'zxx',45), (2,'lhm',25) , (3,'wzg',26) , (4,'tg',27);insert into student values(1,'wy',11), (2,'dh',25) , (3,'ysq',26) , (4,'mxc',27);insert into tea_stu values(1,1), (1,2), (1,3);insert into tea_stu values(2,2), (2,3), (2,4);insert into tea_stu values(3,3), (3,4), (3,1);insert into tea_stu values(4,4), (4,1), (4,2) , (4,3);结果:2_3,3_2,4_3

如果学生表STUDENT是使用下面的SQL语句创建的: CREATE TABLE STUDENT(SNO C(4)PRIMARY KEY NOT NULL. SN C(8), SEX C(2), AGE N(2)CHECK(AGE15 AND AGE25)) 下面的SQL语句中可以正确执行的是( )。A. INSERT INTO STUDENT(SN,SEX,AGE)VALUES(”王磊”,”男”,20)B. INSERT INTO STUDENT(SN0,SEX,AGE)VALUES(”S9”,”男”,17)C. INSERT INTO STUDENT(SEX,AGE)VALUES(”男”,20)D. INSERT INTO STUDENT(SN0,SN,AGE)VALUES(”S9”,”王磊”,14)

如果学生表student是使用下面的SQL谙句创建的: CREATE TABLE student(学号C(6)PRIMARY KEY NOT NULL,姓名C(8),性别C(2),年龄N(2) CHECK(年龄15 AND年龄30,)) 则下面的SQL语句中可以正确执行的是( )。A. INSERT INTO student(学号,性别,年龄)VALUES(”0542”,”李雷”,”男”,17)B. INSERT INTO student(学号,性别,年龄)VALUES(”李雷”,”男”,20)C. INSERT INTO student(学号,性别,年龄)VALUES(”女”,25)D. INSERT INTO student(学号,性别,年龄)VALUES(”0897”,”安宁”,”女”,30)

为使下列代码正常运行,应该在下画线处填入的选项是( )。 int[]numbers=new int[n]; for(int i=0;inumbers. ;i++) numbers[i]=i+1:A.sizeB.lengthC.dimensionD.measurement

如果学生表STUDENT是使用下面的SQL语句创建的 CREATE TABLE STUDENT(SNOC(4)PR1MARY KEY NOTNULL; SNC(8),; SEXC(2),; AGEN(2)CHECK(AGE>15AND AGE<30) 下面的SQI语句中可以正确执行的是 ______。A.INSERT INTO STUDENT(SNO,SEX,AGE)valueS("S9","男",17)B.INSERT INTO STUDENT(SNO,SEX,AGE)valueS(“李安琦”,“男”,20)C.INSERT INTO STUDENT(SEX,AGE)valueS(“男”,20)D.INSERT INTO STUDENT(SNO,SN)valueS("S9",“安琦”,16)

阅读下列说明,回答问题1至问题3。【说明】关于一位花商有以下一些事实。(1)销售在不同地区生长的花,这些地区一年的最低气温在一定范围内变化。(2)想用编号来表示发货类型。(3)要出售某些类型的花。假定已经通过SQL语句建立了基本表:CREATE TABLE Zone(ID CHAR(2) PRIMARY KEY,LowerTemp NUMERIC(3),UpperTemp NUMERIC(3));CREATE TABLE Delivery(ID CHAR (2) PRIMARY KEY,Category CHAR(5),DelSize NUMERIC(5,3));CREATE TABLE FlowerInfo(ID CHAR (3),ComName CHAR(25),LatName CHAR(30),Czone NUMERIC(3),Hzone NUMERIC(3),Delivered NUMERIC(3),SunNeed CHAR(3),PRIMARY KEY(ID));地区(ID,最高温度,最低温度)发货(ID,发货类型,发货规格)花的信息(ID,普通名,拉丁名,花能够生长的最冷地区,花能够生长的最热地区,发货类型,日光需求)写出SQL语句,将记录(ID,Category==pot,DelSize=1.5)插入Delivery表中。

Given the following DDL and INSERT statements:CREATE VIEW v1 AS SELECT col1 FROM t1 WHERE col1 10; CREATE VIEW v2 AS SELECT col1 FROM v1 WITH CASCADED CHECK OPTION; CREATE VIEW v3 AS SELECT col1 FROM v2 WHERE col1 100; INSERT INTO v1 VALUES(5); INSERT INTO v2 VALUES(5); INSERT INTO v3 VALUES(20); INSERT INTO v3 VALUES(100);How many of these INSERT statements will be successful?()A.0B.1C.2D.3

Given the following statements:CREATE TABLE tab1 (col1 INT); CREATE TABLE tab2 (col1 INT); CREATE TRIGGER trig1 AFTER UPDATE ON tab1 REFERENCING NEW AS new1 FOR EACH ROW MODE DB2SQL INSERT INTO tab2 VALUES(new1.col1); INSERT INTO tab1 VALUES(2),(3);What is the result of the following query? SELECT count(*) FROM tab2;()A.3B.2C.1D.0

Given the following DDL for the PARTS table:CREATE TABLE parts (part_no INT(9) NOT NULL, part_name VARCHAR(24), part_remain INT(9));All part numbers entered will be different and all rows should be displayed in order of increasing part numbers whenever the table is queried. Which of the following create index statements will meet this criteria and require the least amount of storage for the index object?()A.CREATE UNIQUE INDEX idx_partno ON parts(part_no)B.CREATE UNIQUE INDEX idx_partno ON parts(part_name ASC)C.CREATE UNIQUE INDEX idx_partno ON parts(part_name, part_no ASC)D.CREATE UNIQUE INDEX idx_partno ON parts(part_no, part_name ASC)

A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement to meet thisrequirement?()A.SequenceB.Table FunctionC.Identity ColumnD.INSTEAD OF Trigger

如果学生表student是使用下面的SQL语句创建的CREATE TABLE student(学号C(4)PRIMARY KEY NOT NULL,;姓名C(8),;性别C(2),;年龄N(2)CHECK(年龄1 5 AND年龄30))下面的SQL语句中可以正确执行的是( )。A)INSERT INTO student(学号,性别,年龄)VALUES(”0542”,”男”,l7)B)INSERT INTO student(姓名,性别,年龄VALUES(”李蕾”,”女”,20)C)INSERT INTO student(姓名,性别,年龄)VALUES(”男”,25)D)INSERT INTO student(学号,姓名)VALUES(”0897”,”安宁”,16)

根据下面所给的AAA数据库,写出下列每条查询语句的执行结果,或者写出下列每条语句或程序段的功能。 假设存在名为AAA的数据库,包括Students(学号char(8),姓名varchar(8),年龄int,专业varchar(20),入学日期DateTime)和Score(学号char(8),课程名varchar(10),成绩numeric(5,2))两张表。 declare @a numeric(5,2),@b numeric(5,2) set @a=(select max(成绩) from score) set @b=(select min(成绩) from score) print @a-@b

SQL Server触发器主要针对下列语句创建()。A、SELECT、INSERT、DELETEB、INSERT、UPDATE、DELETEC、SELECT、UPDATE、INSERTD、INSERT、UPDATE、CREATE

Given the following DDL for the PARTS table:CREATE TABLE parts (part_no INT(9) NOT NULL, part_name VARCHAR(24), part_remain INT(9));All part numbers entered will be different and all rows should be displayed in order of increasing part numbers whenever the table is queried. Which of the following create index statements will meet this criteria and require the least amount of storage for the index object?()A、CREATE UNIQUE INDEX idx_partno ON parts(part_no)B、CREATE UNIQUE INDEX idx_partno ON parts(part_name ASC)C、CREATE UNIQUE INDEX idx_partno ON parts(part_name, part_no ASC)D、CREATE UNIQUE INDEX idx_partno ON parts(part_no, part_name ASC)

Given the following statements: CREATE TABLE tab1 (col1 INT); CREATE TABLE tab2 (col1 INT); CREATE TRIGGER trig1 AFTER UPDATE ON tab1 REFERENCING NEW AS new1 FOR EACH ROW MODE DB2SQL INSERT INTO tab2 VALUES(new1.col1); INSERT INTO tab1 VALUES(2),(3); What is the result of the following query? SELECT count(*) FROM tab2;()A、3B、2C、1D、0

A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement to meet thisrequirement?()A、SequenceB、Table FunctionC、Identity ColumnD、INSTEAD OF Trigger

Your network contains an Active Directory domain. The domain contains 1000 user accounts.  You have a list that contains the mobile phone number of each user  You need to add the mobile number of each user to Active Directory.     What should you do()A、Create a file that contains the mobile phone numbers, and then run ldifde.exeB、Create a fila that contains the mobile phone numbers, and then run csvde.exeC、From Adsiedit, select the CN=Users container, and then mofify the properties of the container.D、From Active Directory Users and Computers, select all of the users, and then modify the properties of the users.

单选题A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement to meet thisrequirement?()ASequenceBTable FunctionCIdentity ColumnDINSTEAD OF Trigger

单选题You are a professional level SQL Server 2005 database administrator in an international corporation named Wiikigo. You are experienced in implementing high-availability solutions, monitoring the database server, and design deployment. In the company, you major job is the deployment, maintenance and support of Microsoft SQL Server 2005. You work as a database administrator for your company. There is a database named Inventory on a SQL Server 2005 computer, and the computer is named SQL01. SQL01 is utilized to aggregate manufacturing part numbers from your company’s trading partners. And the company stores the manufacturing part numbers in the Product table in the Inventory database. The company requests the users to deliver data as text files from each trading partner to SQL1 every night. The data should be imported, and no duplicate manufacturing part numbers should exist in the data which is imported from the text files, and the text files are stored in the Inventory database on SQL01. You should cut the effect on your company’s trading partners and your IT department to the least.  Which action should you perform?()AFirst, you should import the data from each text file into a staging table. Second, you should write a query to have a HAVING clause contained so as to migrate replicate values before results are inserted into the Product table.BFirst, you should make sure that each text file is stored in an Extensible Markup Language (XML) file. Second, you should utilize Extensible Stylesheet Language Transformations (XSLT) to automatically migrate replicates before data is imported into the Product table.CFirst, you should make sure that the unique key values for manufacturing part numbers are utilized by each of your company’s trading partners utilizes. Second, you should import the text files into the Product table.DYou should place a unique index on the PartNum column.

单选题Given the following DDL and INSERT statements: CREATE VIEW v1 AS SELECT col1 FROM t1 WHERE col1 10; CREATE VIEW v2 AS SELECT col1 FROM v1 WITH CASCADED CHECK OPTION; CREATE VIEW v3 AS SELECT col1 FROM v2 WHERE col1 100; INSERT INTO v1 VALUES(5); INSERT INTO v2 VALUES(5); INSERT INTO v3 VALUES(20); INSERT INTO v3 VALUES(100); How many of these INSERT statements will be successful?()A0B1C2D3

单选题When entering a channel from seaward,the numbers on buoys().Aare the same as their Light List numberBare marked in 6 inch figures with retroreflective materialCincrease with the even numbers to starboardDdecrease with the odd numbers to starboard

单选题为使下列代码正常运行,应该在下画线处填入的选项是(  )。int[] numbers=new int[n];for (int i=0; i<numbers. ______;i++)numbers[i]=i+1;AsizeBlengthCdimensionDmeasurement

单选题下列代码的执行结果是(  )。int numbers[] = new int[6];for(int i=1;i numbers[i] =i-1;System.out.print(numbers[i]+" ");}A0 1 2 3 4 5B1 2 3 4 5 6C-1 0 1 2 3 4 D0 1 2 3 4