摘要:
--查询员工及所属部门的信息 select * from people,department where people.departmentid=department.departmentid; --查询员工及所属职级的详细信息 select * from people,[Rank] where p 阅读全文
摘要:
1、先排序取出前两个工资高的员工,在从排名前两个员工中取出最小的即可 select * from people where PeopleSalary=( select min(PeopleSalary) from (select distinct top 2 peopleSalary from pe 阅读全文
摘要:
SQL模糊查询 %:代表匹配0个字符、1个字符或者多个字符 _:代表匹配有且只有一个字符 []:代表匹配范围内 [^]:代表匹配不在范围内 select * from people where PeopleName like '刘%'; --查询姓刘的员工,名字是两个字 select *from p 阅读全文
摘要:
case语句 1、语法:select * , case when then end from 表名; --查询所有员工信息,添加一列,显示生肖 select *, CASE when year(PeopleBirth)%12=4 then '鼠' when year(PeopleBirth)%12= 阅读全文
摘要:
子查询 语法:select * from 表名 where 字段1 条件1 (select * from 表名 where 字段2 条件2); --查询出工资比赵云高的员工信息 SELECT * from people WHERE PeopleSalary>( select peoplesalary 阅读全文
摘要:
oracle参数MEMORY_TARGET太小无法启动的解决过程 环境: windows server 2008 datacenter 4G,4x2=8处理器 oracle 11g 错误如下 ORA-00838: Specified value of MEMORY_TARGET is too sma 阅读全文
摘要:
--reate database Study --drop database study --创建数据库语句 CREATE DATABASE Study ON ( NAME=study_data, filename='c:\software\sql\studydata.mdf', size=10, 阅读全文