随笔分类 -  ms sql server

数据库相关知识
摘要:1、WINDOWS 7或者其他版本的设置方法,请百度!关键是要在防火墙中允许访问1433-1435的TCP端口。 2、关于SQL SERVER不同版本安装到计算上使用了那些端口,系统安装默认是1433-1435,如果是定制端口,请允许定制端口的访问。 3、防火墙是指windows自带的防火墙,如果电 阅读全文
posted @ 2024-09-07 08:48 techNote
摘要:netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile = DOMAIN 经实验 阅读全文
posted @ 2024-09-05 11:55 techNote
摘要:在SQL Server中,HAVING子句用于限制GROUP BY子句返回的结果集。它通常与聚合函数一起使用,用于筛选聚合后的数据。 HAVING子句的语法如下: SELECT column_name(s) FROM table_name WHERE condition GROUP BY colum 阅读全文
posted @ 2024-09-03 20:19 techNote
摘要:创建数据库 Create DataBase students on ( Name='students_data', --数据文件的逻辑名 FileName='D:\students_data.mdf', --数据文件的实际名 Size=10Mb, --数据文件初始大小 FileGrowth=15% 阅读全文
posted @ 2024-09-03 20:09 techNote
摘要:查看某数据库下数据表的个数及数据表的名字 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES; SELECT * FROM INFORMATION_SCHEMA.TABLES;SELECT COLUMN_NAME FROM INFORMATION_SCHEM 阅读全文
posted @ 2024-08-31 21:18 techNote
摘要:select distinct(SF_CLFL) from sf_jlb where SF_CLFL is not null and sf_clfl<>'' and UNICODE(sf_clfl) not BETWEEN 19968 AND 40869; 阅读全文
posted @ 2024-08-28 11:32 techNote
摘要:use ChargeDB;--更新数据update dbo.SF_JLB set SF_YSZJE='150',SF_SSZJE='150' where SF_SSZJE='345' and SF_SFRQ>='2023/8/1' and SF_SFRQ<='2023/8/19 23:59:59'; 阅读全文
posted @ 2024-08-24 09:20 techNote