数据库
iuie_sl
好好睡觉,好好敲代码
展开
-
Sybase 生成table创建语句
在sybase中写一个存储过程,获取table的创建语句。 -- [/Formatter] Formatted with Sybase T-SQL Formatter(version: 1.5.1.14696) at 05/22/2019 18:07:46 08:00:00[Formatter/] IF OBJECT_ID('get_create_sql') IS NOT NULL DROP...原创 2019-05-22 18:15:23 · 1754 阅读 · 0 评论 -
sybase 删除库中的所有用户自定义表
sybase 删除库中的所有表 SELECT 'drop tbale ' + name FROM sysobjects WHERE type = 'U' 把跑出来的全部sql批量执行。原创 2019-05-22 18:20:22 · 370 阅读 · 0 评论 -
MYSQL自减自增
set @i = 1; select @i:= @i +1;原创 2019-07-09 10:03:47 · 1465 阅读 · 0 评论 -
MYSQL通过逗号分隔一行转多行
转化前 转化后 实现sql SET @ncr_str = 'NCR1174599,NCR1174598'; SELECT substring_index(substring_index(@ncr_str, ',', b.help_topic_id + 1), ',', -1) FROM mysql.help_topic b WHERE b.help_topic_id < length(...原创 2019-07-10 10:09:02 · 4279 阅读 · 0 评论