随笔分类 - 数据库方面
mysql,oracle , SQL Server 2008 R2
摘要:尝试重启也没有效果,最终解决方法: 删除Dbeaver安装路径下的org.eclipse.core.resources文件夹(在plugins目录下.删除之前记得备份),然后重新启动Dbeaver即可(重命名文件夹也可以,重新启动后系统会自动生成新的文件夹). 参考路径:C:\Users\xxx\R
阅读全文
摘要:select top @pageSize id from tablename where id not in ( select top @offset id from tablename ) select top 10 id from zd_customer_new where id not in
阅读全文
摘要:1、MySQL如果使用MyISAM存储引擎,数据库文件类型就包括.frm、.MYD、.MYI,默认存放位置是 C:\Documentsand Settings\AllUsers\Application Data\MySQL\MySQL Server 5.1\data 2、MySQL如果使用InnoD
阅读全文
摘要:mysqldump -u root -p --all-databases > e:\sqlall.sql 备份所有数据库(ok) mysqldump -u root -p --all-databases > d:\sqlall.sql 备注单个数据库(OK)mysqldump -u root -p
阅读全文
摘要:DBeaver执行SQL脚本DBeaver最近才使用,以前使用其它sql工具,有些不是很熟悉,记录下来,怎么执行脚本的过程。 我连接的的是msql 8.0的数据库,首先把要下载的sql文件准备好。 然后打开DBeaver 选中要执行的数据库: 选择要导入导出数据库。 右击—>工具-》dump dat
阅读全文
摘要:create table kingdee_pur_purchaseorder ( id int identity(1,1) NOT NULL, org varchar (120), billNo varchar (120), projectName varchar(120), projectCode
阅读全文
摘要:SELECT convert(varchar(6),yw_date,112),count(*) from alu_kingdee_sales_receipt_detailwhere remark = '销售出库单' group by convert(varchar(6),yw_date,112) o
阅读全文
摘要:alter table alu_kingdee_sales_receipt_detail ADD kingdee_qty [DECIMAL] alter table alu_kingdee_sales_receipt_detail ALTER COLUMN kingdee_qty DECIMAL(1
阅读全文
摘要:,6060,6059,0 update sys_dept set ancestors=right (ancestors,char_length(ancestors)-1) where left(ancestors,1)=',';
阅读全文
摘要:(一)购物商城数据库设计-前期准备 (二)购物商城数据库设计-商品表设计 https://blog.csdn.net/thc1987/article/details/80426063 (三)购物商城数据库设计-商品表设计 https://blog.csdn.net/thc1987/article/d
阅读全文
摘要:1. 表结构一样 insert into 表1 select * from 表2 2. 表结构不一样( insert into sys_user_role(user_id,role_id)(select user_id,2 from sys_user) ) insert into sys_dept_
阅读全文
摘要:-- 分页查询(通用型) select top pageSize * from (select row_number() over(order by sno asc) as rownumber,* from student) temp_row where rownumber>((pageIndex-
阅读全文
摘要:Insert into ALU_KINGDEE_POWDER_STORE(org_code,verify_date,material_code,material_name,brand,storage,type,weight)VALUES (?,?,?,?,?,?,?,?) , (?,?,?,?,?,
阅读全文
摘要:https://mp.weixin.qq.com/s/1vTbllmZkHRnuk7_xR2DIg 1. 引言 读写分离要做的事情就是对于一条SQL该选择哪个数据库去执行,至于谁来做选择数据库这件事儿,无非两个,要么中间件帮我们做,要么程序自己做。因此,一般来讲,读写分离有两种实现方式。第一种是依靠
阅读全文
摘要:select count(*) 与select count(id) 区别, 1.速度差不了多少,全表扫,,count(id)它会对id进行非空判断。。 所以时间与count(*)差不多 select * from table where 1=1 ; select * from table where
阅读全文
摘要:select round(273.86015,4,0); 第三个参数0,四舍五select round(273.86014,4,1);第三个参数1,不四舍五
阅读全文
摘要:USE mysql; SELECT 'host' FROM USER WHERE USER='root'; UPDATE USER SET HOST = '%' WHERE USER ='root'; FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON *.* TO
阅读全文
摘要:CREATE TABLE `coupon` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `title` varchar(64) NOT NULL COMMENT '优惠券标题(有图片则显示图片):无门槛50元优惠券 | 单品最高减2
阅读全文
摘要:select CAST (round(2, 2) AS numeric(20,2)) taxPrice
阅读全文