-
现有一个“员工”表,其中一个字段是员工的身份证号码,我们不希望此字段包含空值,如果用户输入数据时没有为此字段指定值,则希望为此字段自动填入“UNKNOWN”,应该如何实现()
A、为此列创建一个CHECK约束
B、为此列创建一个DEFAULT约束
C、为此列创建一个外部关键字约束
D、为此列创建一个主关键字约束
-
在httpd.conf配置文件中,下列配置项有什么意义?User unix- userid
-
现有书目表book,包含字段:price(float);现在查询一条书价最高的书目的详细信息,以下语句正确的是()
A . select top 1 * from book order by price asc
B . select top 1 * from book order by price desc
C . select top 1 * from book where price= (select max (price)from book)
D . select top 1 * from book where price= max(price)
-
有一用户表,表中字段为:用户ID(userid(int))、用户名(username(varchar))、用户密码(password(varchar)),该表需要设置主键,以下说法正确的是()
A . 如果不能有同时重复的username和password,那么username和password可以组合在一起作为主键。
B . 此表设计主键时,根据选择主键的最小性原则,最好采用userid作为主键。
C . 此表设计主键时,根据选择主键的最小性原则,最好采用username和password作为组合键。
D . 如果采用userid作为主键,那么在userid列输入的数值,允许为空。
-
“通过输入数据创建表”方式建立的表结构既说明了表中字段的名称,也说明了每个字段的数据类型和字段属性。
A . 正确
B . 错误
-
Hibernate中的查询语句如下 From User u where u.name=:username and u.yearold=:yearold 正确的参数注入方法有()
A . query.setParameter(“username”,”bluedavy”);
B . query.setParameter(“yearold”,25);
C . query.setParameter(0,”bluedavy”);
D . query.setParameter(1,25);
-
Hibernate中的查询语句如下 from User u where u.name=:username and u.yearold=:yearold 正确的参数注入方式有()。
A . query.setParameter(“username”,”bluedavy”);
B . query.setParameter(“yearold”,”25”);
C . query.setParameter(“0”,”bluedavy”);
D . query.setParameter(“1”,”25”);
-
修改表LOGIN_TABLE的USERNAME=‗SUPERADM的记录的USRID的值为100的的正确语句是:()。
A . UPDATELOGIN_TABLESET USERNAME=100WHERE USERNAME=‗SUPERADM
B . UPDATELOGIN_TABLESET USRID=100WHERE USERNAME=‗SUPERADM
C . UPDATELOGIN_TABLESET USERNAME=100WHERE USRID=‗SUPERADM
D . UPDATELOGIN_TABLESET USRID=100
-
You have a portable computer that runs Windows 7. The computer is joined to a domain. Multiple users logon to the computer. You need to prevent the computer from displaying the username of the last user whologged on. What should you do?()
A . From Control Panel, modify the User Profiles settings.
B . From Control Panel, modify the Personalization settings.
C . From the local computer policy, add a policy template.
D . From the local computer policy, modify the local security policy.
-
Hibernate 中的查询语句如下 from User u where u.name=:username and u.yearold=:yearold 正确的参数注入方式有()
A . query.setParameter(“username”,”bluedavy”);
B . query.setParameter(“yearold”,25);
C . query.setParameter(0,”bluedavy”);
D . query.setParameter(1,25);
-
在表user有name、tel和data3个字段,要求向表user中插入一新记录,该记录数据分别为:王明、8888888、2005-5-5,用SQL语句实现操作是()。
A . A.INSERINTOuserVALUES(王明,8888888,2005-5-5)
B . B.INSERINTOuserVALUES“王明”,”8888888”,#2005-5-5#
C . C.INSERINTOuser(name,tel,datA.VALUES(“王明”,“8888888”,#2005-5-5#)
D . D.INSERINTOuser(name,tel,datA.VALUES(“王明”,“8888888”,“2005-5-5“)
-
您正在编写代码的用户身份验证和授权。 在您的应用程序数据存储区中存储的用户名、 密码和角色。 您需要建立用户的安全上下文将用于授权检查,如 IsInRole。 您编写下面的代码段,授权用户。() if (!TestPassword(userName, password)) throw new Exception("could not authenticate user"); String[] userRolesArray = LookupUserRoles(userName);
A .https://assets.asklib.com/images/image2/2018072714051478834.jpg
B .https://assets.asklib.com/images/image2/2018072714051762657.jpg
C .https://assets.asklib.com/images/image2/2018072714052068043.jpg
D .https://assets.asklib.com/images/image2/2018072714052350832.jpg
-
假定有一个用户表,表中包含字段:UserId(int)、UserName(varchar)、PassWord(varchar)等,该表需要设置主键,以下说法最恰当的是()。
A . 此表设计主键时,根据选择主键的最少性原则,最好采用UserId和PassWord作为组合主键。
B . 此表设计主键时,根据选择主键的最少性原则,最好采用UserId作为主键。
C . 此表设计主键时,根据选择主键的最少性原则,最好采用UserName和PassWord作为组合主键。
D . 如果采用UserId作为主键,那么在UserId列输入的数值,允许为空。
-
Hibernate中的查询语句如下 From User u where u.name=:username and u.yearold=:yearold正确的参数注入方式有()
A . query.setParameter("username","bluedavy")
B . query.setParameter("yearold",25)
C . query.setParameter(0,"bluedavy")
D . query.setParameter(1,25)
-
PreparedStatement 执行如下: insert into users(username,password,city)values(?,?,?) 语句正确的是( )。
-
PreparedStatement 执行如下: insert into users(username,password,city)values(?,?,?) 语句正确的是( )。
-
现有表 book ,字段: id (int) , title (varchar), price (float); 其中 id 字段设为标识, 使用 insert 语句向 book 表中插入数据,以下语句错误的是()。
-
现有订单表orders,包含用户信息userid, 产品信息 productid, 以下()语句能够返回至少被订购过两回的productid
A、select productid from orders where count(productid)>1
B、select productid from orders where max(productid)>1
C、select productid from orders where having count(productid)>1 group by productid_
D、select productid from orders group by productid having count(productid)>1
-
现有书目表book,包含字段:price (float); 现在查询一条书价最高的书目的详细信息,以下语句正确的是()
A、select top 1 * from book order by price asc
B、select top 1 * from book order by price desc
C、select top 1 * from book where price= (select max (price)from book)
D、select top 1 * from book where price= max(price)
此题为多项选择题。
-
以下()大数据计算服务(MaxCompute,原ODPS)的SQL语句可以用户表user中找出用户名称username中包含’hu’的记录。
A.select*fromuserwhereusernamerlike‘.*hu.*’
B.select*fromuserwhereusernamelike‘%hu%’
C.select*fromuserwhereusernamecontains(‘hu’)
D.select*fromuserwhereusernamelike‘*hu*’
-
现有书目表book,包含字段:价格price (float),类别type(char); 现在查询各个类别的平均价格、类别名称,以下语句正确的是()(选一项)
A.select avg(price),type from book group by type
B.select count(price),type from book group by price
C.select avg(price),type from book group by price
D.select count (price),type from book group by type
-
现有表book,字段:id (int),title (varchar), price (float); 其中id字段设为自增长的标识, 使用insert语句向book表中插入数据,以下语句错误的是()(选一项)
A.insert into book (id,title,price) values(1,'java',100)
B.insert into book (title,price) values('java',100)
C.insert into book values ('java',100)
D.insert book values('java',100)
-
在ASP.NET中,现有一个表dt1,它只有一个字段name,想用DataList进行数据绑定,则在html视图中应该用的绑定脚本为(选一项)()
A.<%@ Eval("dt1")%>
B.<% Eval("dt1")%>
C.<%= Eval("name")%>
D.<% Eval("name")%>
-
现有用户user1,有数据库demo1,如果user1对数据库demo1中所有表都有修改的权利,需要编写的sql语句是()。
A.updatedemo1set
B.GRANTupdateondemo 1.*to'user1'@'localhost'
C.GRANTupdateondemo1to'user1'@'localhost'
D.GRANTupdateondemo1.demo1to'user1'@'localhost'