heidisql

SQL substring replacing

故事扮演 提交于 2019-12-11 01:05:07
问题 I am using HeidiSql and I have a database with ~1000 URL's. Example: index.php?option=com_flexicontent&view=items&cid=283&id=33 index.php?option=com_flexicontent&view=items&cid=421&id=4411 index.php?option=com_flexicontent&view=items&cid=415&id=4375 What I have to do is to replace the cid= with values from 408 to 477 to cid=403 I have made a SQL script like this: UPDATE jos_menu SET link = REPLACE(link, "cid=411", 'cid=403') But how do I change the cid= values 408 to 477, without making 70

Stored Procedure in Java Spring Boot Project returns null as Output

十年热恋 提交于 2019-12-08 04:58:57
问题 I'm using a stored procedure in a Spring Boot project and trying to get an output value, but in my project it always returns null. But if I'm calling the procedure through HeidiSQL it works and gives me the right value. So it has to do something with my java code. I debugged the affected method, but couldn't find out why it returns null. I already tried to look up other posts, but couldn't find something that matches my specific issue. This is my method where I try to use the stored procedure

Stored Procedure in Java Spring Boot Project returns null as Output

五迷三道 提交于 2019-12-08 02:18:25
I'm using a stored procedure in a Spring Boot project and trying to get an output value, but in my project it always returns null. But if I'm calling the procedure through HeidiSQL it works and gives me the right value. So it has to do something with my java code. I debugged the affected method, but couldn't find out why it returns null. I already tried to look up other posts, but couldn't find something that matches my specific issue. This is my method where I try to use the stored procedure: CompanyResourceServiceImpl @Service public class CompanyResourceServiceImpl implements

Unable to connect to LocalDB with HeidiSQL

大城市里の小女人 提交于 2019-12-04 14:05:38
问题 I have been trying to connect to a localdb instance with the latest version (at this time) of heidisql to no avail. I have followed the instructions from this answer here but it doesn't seem to work (anymore): HeidiSql connection to MS SQL Server LocalDB I tried the following: 1) heidisql -d=LocalDB -h=%pipename% -n=3 -d=LocalDB 2) heidisql -d=LocalDB -h= np:\.\pipe\LOCALDB#41CF9FCB\tsql\query -n=3 -d=LocalDB (i realize that the number changes every time your start a new localdb instance) 3)

SQL Error (1215): Cannot add foreign key constraint

核能气质少年 提交于 2019-12-04 06:19:31
问题 CREATE TABLE `profilePic` ( `ClientID` VARCHAR(255) NOT NULL, PRIMARY KEY (`ClientID`), CONSTRAINT `FK__user_details` FOREIGN KEY (`ClientID`) REFERENCES `user_details` (`ClientID`) ON UPDATE CASCADE ON DELETE CASCADE ) COLLATE='utf8mb4_unicode_ci' ENGINE=InnoDB ; I am trying to add table with foreign key and I got this error, why that happend ? trying doing new table. i am trying to put same details on user_details->ClientID and profilePic->ClientID 3.i have already one table call`d userdb

SQL Error (1215): Cannot add foreign key constraint

匆匆过客 提交于 2019-12-02 07:53:03
CREATE TABLE `profilePic` ( `ClientID` VARCHAR(255) NOT NULL, PRIMARY KEY (`ClientID`), CONSTRAINT `FK__user_details` FOREIGN KEY (`ClientID`) REFERENCES `user_details` (`ClientID`) ON UPDATE CASCADE ON DELETE CASCADE ) COLLATE='utf8mb4_unicode_ci' ENGINE=InnoDB ; I am trying to add table with foreign key and I got this error, why that happend ? trying doing new table. i am trying to put same details on user_details->ClientID and profilePic->ClientID 3.i have already one table call`d userdb and in this table i have ClientID and its foreign key and its work. Drew The below will fail because the

ysql如何修改所有的definer

时光怂恿深爱的人放手 提交于 2019-12-01 07:00:27
mysql中的definer是什么,有什么作用? 我们在mysql创建view、trigger、function、procedure、event时都会定义一个Definer=‘xxx’,类似如下: CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`%` SQL SECURITY DEFINER VIEW `v_ questions` AS SELECT `q`.`id` AS `id`, `q`.`title` AS `title` FROM Test q; 或者像这样的: CREATE DEFINER=`root`@`%` PROCEDURE `user_count`() LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN select count(*) from mysql.user; END 加红的部分SQL SECURITY 其实后面有两个选项,一个为DEFINER,一个为INVOKER SQL SECURITY { DEFINER | INVOKER } :指明谁有权限来执行。DEFINER 表示按定义者拥有的权限来执行 INVOKER 表示用调用者的权限来执行。默认情况下,系统指定为DEFINER 以存储过程为例:

后端开发小工具(免费易用的小工具,摆脱盗版烦恼)

老子叫甜甜 提交于 2019-11-26 22:39:32
1.虚拟机:VMware Player 是不是每次要用到虚拟机的时候都不知道该如何选择,希望拥有VMware Workstation那强大的功能又畏惧它的体积,喜欢virtualBox的小巧又烦恼它天天更新。 VMware Player是VMware官方退出的免费的虚拟机工具,虽然名为Player,但是也可以创建虚拟机,也可以安装VMware Tools。速度快且稳定。只有不到百兆的体积,值得推荐。 2.SSH工具:Xshell 4 喜欢putty酷黑的界面和字体,却烦恼它简陋的功能。喜欢secureCRT的强大,无奈是收费软件,而且默认的配色和字体及丑。 这里推荐Xshell 4。面向个人和校园用户免费,几乎拥有secureCRT的全部功能(也有secureCRT不具备的功能)。界面简洁美观。 从secureCRT更换到Xshell仅需要在设置里修改一些右键和鼠标中间的功能即可。 个人觉得选中文本框的时候的菜单比secureCRT右键直接复制粘贴更为方便。且选中文件名可以直接ZMODEM下载。 3.SQL客户端:HeidiSQL 用惯了phpmyadmin,当面对一台没有安装web服务器和phpmyadmin就显得有点窘迫了。HeidiSQL这时候就能大显身手了。免费开源的SQL工具,基于TCP的连接。小巧但功能强大。特别是在开发过程中构造数据的时候可以右键直接插入时间戳等数值

mysql Foreign key constraint is incorrectly formed error

我们两清 提交于 2019-11-26 03:23:43
问题 I have two tables, table1 is the parent table with a column ID and table2 with a column IDFromTable1 (not the actual name) when I put a FK on IDFromTable1 to ID in table1 I get the error Foreign key constraint is incorrectly formed error . I would like to delete table 2 record if table1 record gets deleted. Thanks for any help ALTER TABLE `table2` ADD CONSTRAINT `FK1` FOREIGN KEY (`IDFromTable1`) REFERENCES `table1` (`ID`) ON UPDATE CASCADE ON DELETE CASCADE; Let me know if any other

mysql Foreign key constraint is incorrectly formed error

冷暖自知 提交于 2019-11-25 21:49:21
I have two tables, table1 is the parent table with a column ID and table2 with a column IDFromTable1 (not the actual name) when I put a FK on IDFromTable1 to ID in table1 I get the error Foreign key constraint is incorrectly formed error . I would like to delete table 2 record if table1 record gets deleted. Thanks for any help ALTER TABLE `table2` ADD CONSTRAINT `FK1` FOREIGN KEY (`IDFromTable1`) REFERENCES `table1` (`ID`) ON UPDATE CASCADE ON DELETE CASCADE; Let me know if any other information is needed. I am new to mysql I ran into this same problem with HeidiSQL. The error you receive is