摘要:
使用注解的时候再service层的两个方法中分贝添加了@Scheduled注解和@Transactional注解,启动项目时报错,报错信息为: log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://l 阅读全文
摘要:
内连接 现在有两张表,学生表student1,成绩表SC1,两张表的数据如下 现在要对两张表做连接查询,连接一般需要写条件,where 或者 on 后面 , select * from student,SC where student.sid=SC.sid from 后面直接写两个表名,这样写等价于 阅读全文
该文被密码保护。 阅读全文
摘要:
要写一个存储过程,如果临时表 test 不存在 ,新建临时表,如果存在不新建 alter procedure testas if object_id('tempdb..#test') is null begin print '不存在' create table #test ( number int 阅读全文
该文被密码保护。 阅读全文
摘要:
--随机数保留两位小数 --视图创建 as go 和存储过程不一样,sql语句需要别名 --因为函数中不能使用 rand() ,所以先创建一个视图,函数调用视图create view v_randomas select round((RAND()*1000),2) as random1go --调用 阅读全文