
sql
study_wx
这个作者很懒,什么都没留下…
展开
-
Oracle 查询到的数据可以编辑 使用 ROWID
例子:select t.*,t.rowid from table_name t原创 2020-05-11 17:46:11 · 2502 阅读 · 0 评论 -
数据库查询问题:列出各个部门中工资高于本部门的平均工资的员工数和部门号,并按部门号排序
1、先创建要用到的例子表,并在表里面插入记录,在sqlserver中做测试 Sql代码 create table employee( id int identity(1,1) primary key , name varchar(50), salary bigint, deptid int); insert into employee values('zs',1000,1), ...转载 2018-03-15 16:22:16 · 21259 阅读 · 3 评论 -
MySQL The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zo
The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zo出现这个问题后直接在数据库上查询输入:setglobaltime_zone ='+8:00';即可...原创 2019-03-22 18:14:47 · 209 阅读 · 0 评论 -
MySql 中 case when then else end 的用法 (转载)
MySql 中 case when then else end 的用法解释:SELECT case -------------如果 when sex='1' then '男' -------------sex='1',则返回值'男' when sex='2' then '女' ------------...转载 2019-04-29 09:48:11 · 226 阅读 · 0 评论 -
索引的学习
查看表中已经存在 index:showindex from table_name;创建和删除索引索引的创建可以在CREATE TABLE语句中进行,也可以单独用CREATE INDEX或ALTER TABLE来给表增加索引。删除索引可以利用ALTER TABLE或DROP INDEX语句来实现。(1)使用ALTER TABLE语句创建索引。语法如下:alter table tab...转载 2019-05-14 11:11:02 · 167 阅读 · 0 评论