• sql 2000 字段查询修正


    internal static string GetTableColumns2000()
            {
                sqlText.Remove(0, sqlText.Length);
                sqlText.Append("select s1.name as ColumnName,case s2.name when 'nvarchar' then s1.[prec] else s1.[length] end  as [MaxSize],");
                sqlText.Append("isnullable as [IsNullable],colstat as [ReadOnly],s2.name as [SqlType] ,isnull(s3.[value],'no description') as description ");
                sqlText.Append("from syscolumns s1 right join systypes s2 on s2.xusertype =s1.xusertype  ");//修正有变化
                sqlText.Append("left join sysproperties s3 on  (s3.id=s1.id and s3.smallid = s1.colid)");//修正有变化
                sqlText.Append("where s1.id=object_id(@TableName)  and s2.name<>'sysname' order by ReadOnly desc  ");//修正有变化
                //sqlText.Append("select substring(@@Version, 25,1)  ");
                return sqlText.ToString();
            }

    从2010-09-19记录了:
    9:OutPutData 数据库2000输出屏蔽系统自带的[表/视图/存储过程]

    string sql2000 = "select name from sysobjects where status>0 and xtype='" + tableType.ToString() + "'";

    版权声明:本文原创发表于 博客园,作者为 路过秋天 本文欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则视为侵权。
    个人微信公众号
    创业QQ群:617713515
    Donation(扫码支持作者):支付宝:
    Donation(扫码支持作者):微信:
  • 相关阅读:
    openstack 介绍
    python实现图片批量剪裁的程序
    iOS开发多线程篇—GCD介绍
    block代码块介绍
    ios中的界面跳转方式
    NSNotificationCenter消息机制的介绍
    ios的手势操作之UIGestureRecognizer浅析
    collectionViewFlow的界面编写
    UITableView的简单应用介绍
    滚动视图创建
  • 原文地址:https://www.cnblogs.com/cyq1162/p/1829588.html
Copyright © 2020-2023  润新知