不知道“select 1 from sys.systable where table_name”是什么意思

nongfuxu 2016-03-09 08:12:42
设计好物理数据模型、导出sql语句后,在导出的文件中看到以下语句,
if exists(select 1 from sys.systable where table_name='tb_Area' and table_type='BASE') then
drop table dbo.tb_Area
end if;


这里,tb_Area是我给数据表起的名称。请教select 1 from sys.systable是什么意思?

另外在执行这个SQL文件时也报错。我应该怎样查找问题?
...全文
4386 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yccf 2017-06-20
  • 打赏
  • 举报
回复
楼上完全正解
Amina_L 2017-06-17
  • 打赏
  • 举报
回复
这个查询的意思是判断你的数据库中是否有这个表,如果有就删除; 说有语法错误的原因可能是你的connection configure有问题,可以贴出来看看
猎奇567 2016-03-10
  • 打赏
  • 举报
回复
产生的是Sybase SQL anywhere数据库的SQL,连接SQL Server数据库执行?
jlwei888 2016-03-10
  • 打赏
  • 举报
回复
系统表,就看表tb_area 是否存在,是就删除,再创建
nongfuxu 2016-03-09
  • 打赏
  • 举报
回复
已知 select 1 from == select * from 那么这里的sys.systable是指哪个? 在文件夹中搜索“sys.systable”,没有找到它。
nongfuxu 2016-03-09
  • 打赏
  • 举报
回复
在PD16中,运行sql文件报错如下图所示。
nongfuxu 2016-03-09
  • 打赏
  • 举报
回复
由PD16生成的sql文件代码如下
/*==============================================================*/
/* DBMS name:      New DBMS                                     */
/* Created on:     2016/3/9 20:03:14                            */
/*==============================================================*/


if exists(select 1 from sys.systable where table_name='tb_Area' and table_type='BASE') then
   drop table dbo.tb_Area
end if;

if exists(select 1 from sys.systable where table_name='tb_City' and table_type='BASE') then
   drop table dbo.tb_City
end if;

if exists(select 1 from sys.systable where table_name='tb_Controller' and table_type='BASE') then
   drop table dbo.tb_Controller
end if;

if exists(select 1 from sys.systable where table_name='tb_Intersection' and table_type='BASE') then
   drop table dbo.tb_Intersection
end if;

if exists(select 1 from sys.systable where table_name='tb_IntersectionPeriodPhase' and table_type='BASE') then
   drop table dbo.tb_IntersectionPeriodPhase
end if;

if exists(select 1 from sys.systable where table_name='tb_PhaseConflict' and table_type='BASE') then
   drop table dbo.tb_PhaseConflict
end if;

if exists(select 1 from sys.systable where table_name='tb_PhasesDetail' and table_type='BASE') then
   drop table dbo.tb_PhasesDetail
end if;

if exists(select 1 from sys.systable where table_name='tb_SubArea' and table_type='BASE') then
   drop table dbo.tb_SubArea
end if;

/*==============================================================*/
/* User: dbo                                                    */
/*==============================================================*/
/*==============================================================*/
/* Table: tb_Area                                               */
/*==============================================================*/
create table dbo.tb_Area (
AreaID int not null,
AreaName varchar,
CityID int not null
);

/*==============================================================*/
/* Table: tb_City                                               */
/*==============================================================*/
create table dbo.tb_City (
CityID int not null default '(1000)',
CityName varchar  default '未定义'
);

/*==============================================================*/
/* Table: tb_Controller                                         */
/*==============================================================*/
create table dbo.tb_Controller (
ControllerID int not null,
ControllerName varchar not null default '新源22路控制器',
ControllerType varchar not null default '22路控制器'
);

/*==============================================================*/
/* Table: tb_Intersection                                       */
/*==============================================================*/
create table dbo.tb_Intersection (
IntersectionID int not null default '(0)',
IntersectionName varchar not null default '未定',
StreetNameEW varchar not null default '未定',
StreetNameSN varchar not null default '未定',
SubAreaID int not null default '(0)',
LampEWType varchar not null,
LampSNType varchar not null,
LaneNumberEW int not null,
LaneNumberSN int not null,
ControllerID int not null default '(0)',
Position1X int not null default '(0)',
Position1Y int not null default '(0)',
Position2X int not null default '(0)',
Position2Y int not null default '(0)',
Position3X int not null default '(0)',
Position3Y int not null default '(0)',
Position4X int not null default '(0)',
Position4Y int not null default '(0)'
);

/*==============================================================*/
/* Table: tb_IntersectionPeriodPhase                            */
/*==============================================================*/
create table dbo.tb_IntersectionPeriodPhase (
TotalPeriodPhaseID int not null default '(10)',
IntersectionID int not null default '(0)',
InterPeriodPhaseNo int not null default '(1)',
PhasesNumber int not null default '(4)'
);

/*==============================================================*/
/* Table: tb_PhaseConflict                                      */
/*==============================================================*/
create table dbo.tb_PhaseConflict (
ID int not null,
IntersectionID int not null default '(0)',
"Rows" int not null default '(0)',
LampName varchar,
EL varchar not null default 'R',
ET varchar not null default 'R',
ER varchar not null default 'R',
SL varchar not null default 'R',
ST varchar not null default 'R',
SR varchar not null default 'R',
WL varchar not null default 'R',
WT varchar not null default 'R',
WR varchar not null default 'R',
NL varchar not null default 'R',
NT varchar not null default 'R',
NR varchar not null default 'R',
EW varchar not null default 'R',
SW varchar not null default 'R',
WW varchar not null default 'R',
NW varchar not null default 'R'
);

/*==============================================================*/
/* Table: tb_PhasesDetail                                       */
/*==============================================================*/
create table dbo.tb_PhasesDetail (
TotalPhaseID int not null,
TotalPeriodPhaseID int not null,
PhaseNo int not null default '(0)',
PhaseTime_Isolate int not null default '(20)',
PhaseTime_FlexiLink int not null default '(20)',
LampEL varchar not null default 'C',
LampET varchar not null default 'C',
LampER varchar not null default 'C',
LampEP1 varchar not null default 'C',
LampEP2 varchar not null default 'C',
LampSL varchar not null default 'C',
LampST varchar not null default 'C',
LampSR varchar not null default 'C',
LampSP1 varchar not null default 'C',
LampSP2 varchar not null default 'C',
LampWL varchar not null default 'C',
LampWT varchar not null default 'C',
LampWR varchar not null default 'C',
LampWP1 varchar not null default 'C',
LampWP2 varchar not null default 'C',
LampNL varchar not null default 'C',
LampNT varchar not null default 'C',
LampNR varchar not null default 'C',
LampNP1 varchar not null default 'C',
LampNP2 varchar not null default 'C'
);

/*==============================================================*/
/* Table: tb_SubArea                                            */
/*==============================================================*/
create table dbo.tb_SubArea (
SubAreaID int not null,
SubAreaName varchar  default '待定',
AreaID int not null default '(0)'
);

内容概要:本文聚焦于“通过ADMM进行TV-L1去噪”的研究,系统阐述了基于交替方向乘子法(ADMM)实现总变差(Total Variation, TV)正则化与L1范数稀疏约束相结合的图像去噪模型。文中详细解析了TV-L1模型的数学构建及其在抑制椒盐噪声、保持图像边缘结构方面的优越性,重点介绍了ADMM算法如何将复杂的凸优化问题分解为多个可高效求解的子问题,提升收敛效率与数值稳定性。配套提供的Matlab代码实现了完整的去噪流程,便于读者复现算法并开展实验验证。此外,文档还整合了电力系统、信号处理、路径规划、机器学习等多个领域的科研资源,凸显其作为综合性学术资料包的价值。; 适合人群:具备良好数学基础与Matlab编程能力,从事图像处理、信号去噪、优化算法或相关领域研究的研究生、科研人员及工程技术人员。; 使用场景及目标:① 深入理解并复现基于ADMM的TV-L1图像去噪算法;② 掌握总变差正则化与L1范数在稀疏噪声去除中的理论与应用;③ 利用所提供的Matlab代码进行算法调试、性能评估与二次开发;④ 借助附带的多领域科研案例拓展研究思路,推动跨学科技术创新。; 阅读建议:建议读者结合理论推导与Matlab代码实践,逐步跟踪ADMM的迭代过程,观察其收敛行为与去噪效果,同时可参考文档末尾提供的丰富科研资源链接,拓展技术视野与研究深度。
内容概要:本文档为一篇博士论文的复现资料,聚焦于计及锁相环频率耦合效应的光伏逆变器序阻抗解析建模与扫频稳定评估研究。基于Matlab编程与Simulink仿真平台,构建了包含锁相环动态特性的光伏并网逆变器正负序阻抗模型,深入剖析其在弱电网条件下因锁相环引发的频率耦合机制,并采用小信号扫频法进行阻抗特性辨识与系统稳定性分析。文档系统呈现了理论建模的数学推导过程、仿真模型搭建细节及核心代码实现,旨在完整复现并验证原论文的关键研究成果,帮助使用者掌握新能源发电系统接入弱电网时的小信号稳定性分析方法与技术路径。; 适合人群:具备电力电子、自动控制及电力系统稳定性相关基础知识,熟练掌握Matlab/Simulink仿真工具,从事新能源并网技术、微电网稳定性分析、逆变器控制策略研究的研究生、科研人员及工程技术人员。; 使用场景及目标:① 深入理解光伏逆变器序阻抗建模理论,特别是锁相环导致的正负序频率交叉耦合现象;② 掌握基于扫频法的阻抗测量与奈奎斯特稳定性判据应用,评估并网系统的稳定裕度;③ 复现高水平学术论文的核心成果,为自身科研项目提供可靠的理论依据、成熟的代码框架与仿真技术参考。; 阅读建议:学习者应结合所提供的Matlab代码与Simulink仿真模型,循序渐进地理解阻抗建模的理论推导与实现逻辑,重点在于动手调试扫频模块以获取精确的阻抗频率响应曲线,并通过调整控制器参数、电网强度等变量,观察其对系统阻抗特性与稳定性的影响,从而深化对理论知识的实践应用与创新能力。

754

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧