问题标签 [sqlyog]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
mysql - SQL查询自动输入日期变量
我正在使用 SQLYog 上的计划报告功能来发送关于我们生产线的每小时生产报告。我遇到的问题是如何让我的查询自动填充我的开始和结束日期。以下是我的查询示例:
我基本上只需要自动填充第一个变量中的日期戳,因为班次开始和停止时间总是相同的。
mysql - Reverse an sql statement?
I have an sql file with alot of create, alterings and modifies to a database. If I need to back out at some point (up to a day maybe) after executing the sql script, is there an easy way to do that? For example, is there any tool to read an sql script and produce a 'rollback' script from it?
I am using sqlyog aswell, in case there happens to be any such features built-in (I havn't found any)
mysql - mysql存储过程不工作
我正在尝试使用以下代码调用 mysql 存储过程:
存储过程是:
我知道我与数据库的连接很好,因为如果我运行一个简单的选择查询,我会得到我所期望的。
当我运行上述内容时,我收到以下错误:
致命错误:在非对象等上调用成员函数 fetch_array() 等等,这导致我认为查询没有返回任何内容。
我使用 SQLYOG 并且可以从那里成功运行该过程。任何帮助,将不胜感激。
mysql - 更改 IP 地址后,由于 DEFINER 错误而无法更改 MySQL 函数
I have a MySQL db that I connect to via SQLYog. When I connect, my home IP address is appended to my username. For example: xxxx_ratesadmin@123.456.789
This creates the definer of an object such as a stored procedure or function and I can only alter those objects when connecting from that IP address.
Some time ago I was forced to switch ISP and was provided with a new IP address before this happened I took a back up of the database so I would be able to change the definer to the new IP but I missed a number of Stored Procedures and functions which I now need to alter but can't and just get the error "Unable to retrieve information. Please check your permission." I also cannot access them through phpmyadmin as there is no edit button next to those objects.
I thought I might be able to do this through the routines table in information_schema but apparently don't have permissions to make changes to that and there is no edit option when viewing that table in phpmyadmin.
This would not be so bad if I could at least copy the contents of the routine so I could recreate the objects but they just show as blank fields for any object with the old definer.
If anyone can give me any guidance on this it would be hugely appreciated! :)
Kind Regards
Mike
mysql - MySQL 在本地机器上保存 INTO OUTFILE
我有一个到远程 SQL 服务器的 SQL 连接,并且想运行一个查询,结果存储在一个输出文件中。问题是我想将文件本地保存在我的机器上。
我该怎么做呢?
mysql - 当 innodb_forced_recovery > 0 [SqlYog] 时不允许操作
我已经使用 SQLyog 创建了一个表。当我将值插入其中时,它会弹出以下错误消息:
我的表只包含四列,包括一个主键。以下是我的创建和插入查询:
mysql - 如何在 MySQL 中使用 to_char 函数功能
我有一张表tine_by_day
,我知道如何使用TO_CHAR
in 函数oracle
,但是如果我使用 in ,如何获得相同的输出MySQL
?
MySQL
for中是否有任何转换功能TO_CHAR()
?
我已经尝试过date_format
了,但to_char
我没有得到足够的结果。
mysql - 如何从包含大量记录的mysql数据库中进行备份?
当我尝试从 sqlyog 或使用如下命令进行备份时,我的 mysql 数据库中有 10k 条记录
输出文件的格式不正确,如下所示,如果我尝试将此文件导入另一个数据库,则会出现错误。当我有少量记录时,它可以正常工作。
你能帮我备份我的数据库吗?提前致谢。
mysql - mysql 函数来查找是否存在 tbl 1 值。如果存在将其添加到 tb2
不使用主键和外键。 我有 tb1 n tb2。现在的问题是我想写乐趣来检查 tb1 中存在的值。如果 tb1 存在,则将其添加到 tb2
我收到类似错误代码的错误:1064 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在 'set a=1; 附近使用正确的语法;返回一个;END' 在第 6 行,请帮助我。提前致谢
mysql - 相关规范中的哪些地方记录了 SQL 脚本中的某些注释实际上是作为有效 SQL 执行的(由 MySQL 执行)?
在浏览由程序 SQLYog 为 MySQL 5.6.16 数据库生成的 SQL 转储时,我注意到每个存储过程CREATE
语句都被注释字符 ( /* */
) 包围。但是,存储过程是在执行 SQL 脚本时创建的。
我很惊讶看到围绕存储过程CREATE
语句的注释,然后看到这些注释语句实际上已被执行。
看到这确实发生了,我假设事实上无论是 SQL 标准、MySQL 本身还是 SQLYog,它都支持执行至少一些注释的 SQL 代码。
这导致我搜索规范文档,其中列出了有关在运行 SQL 脚本时执行某些注释代码块这一事实的详细信息。然而,整整一小时的搜索(特别是寻找官方规范,其次是搜索 SQL、MySQL 或 SQLYog 的任何此类文档)实际上只显示了一个链接,该链接甚至提到了以下事实: SQL 脚本中的代码实际上是被执行的。这是:执行注释的 SQL 行的参考链接(包括一些答案)。
我知道我可能在这里遗漏了明显的内容,但我无法找到此规范。
有人可以确认,如果是,请提供参考,说明(并描述)将执行的 SQL 的正式文档,即使/* */
语句周围有“”语法(无论是 SQL、MySQL 还是 SQLYog) ? 谢谢。