B、对student表添加一个default约束
C、对sex列添加一个触发器在提交后严重数据
D、对sex列添加一个check约束
B、对student表添加一个default约束
C、对sex列添加一个触发器在提交后严重数据
D、对sex列添加一个check约束
B、select sum(*) from student_tb where sex = '男';
C、select avg(*) from student_tb where sex = '男';
D、select max(*) from student_tb where sex = '男';
stu_info(stu_id,name,birthday,sex,address,mark,major,sdept)
stu_id 一一一学号
name一一一姓名
birthday 一一一出生日期
sex一一一性别
address一一一居住地址
mark一一一成绩
major一一一专业
sdept一一一所在院系
写出 Transact- SQL 语句,按性别统计表 stu_info 中的人数及平均成绩。
A. (’1031’,’曾华’,男,23)
B. (’1031’,’曾华’,NULL,NULL)
C. (NULL,’曾华’,’男’,’23’)
D. (’1031’,NULL,’男’,23)
A、INSERT INTO student VALUES(11,'abc',20, 'f')
B、INSERT INTO student(studentid,sex,age) VALUES (11,'f',20)
C、INSERT INTO student(studentid,sex,age) VALUES (11,20, 'f',NULL)
D、INSERT INTO student SELECT 11, 'ABC',20, 'F', 'test'
有表结构如下: CREATE TABLE `test` ( `a` int(11) NOT NULL, `b` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL, PRIMARY KEY (`a`), KEY `idx1` (`c`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 +---+------+------+ | a | b | c | +---+------+------+ | 1 | 1 | 1 | | 2 | 2 | 2 | | 3 | 3 | 3 | +---+------+------+ 下面有A,B两个连接开启的事务: A连接 B连接 begin begin update test set c = 15 where a = 1 ; update test set c = 12 where a = 2 ; update test set b = 15 where b = 1 ; update test set c = 12 where a = 3 ; update test set b = 15 where b = 1 ; 下面描述正确的是:
A、B连接的第一个update不会被阻塞
B、A连接的第二个update会被阻塞
C、B连接的第二个update会被阻塞
D、B连接的第三个update不会被阻塞
A、(100,100,10.5)
B、(100,101,10.5)
C、(100,100,10.50)
D、语句无法执行
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!