请注意Oracle对象的大小写 (请注意英语)

教程大全 2025-07-18 18:10:40 浏览

在数据库新建一个测试表(数据库版本为ORACLE10.2.0.1.0),表名为小写的

下面我们用双引号来新建另外一个表(ORACLE 中 ” “ 的作用是强制区分大小写,以及关键字做字段时用””) 脚本如下所示:

请注意Oracle对象的大小写 上面的例子也许会让觉得比较奇怪,这种现象在SQL SERVER里面是不存在的。这是因为ORACLE在建表或者字段时,如果没有双引号, ORACLE 会把表名、字段名全部转化为大写字母然后写入数据字典。访问数据字典时,没有双引号 ORACLE 会将其转化成大写然后再去数据字段中查找。如果加上双引号则能区分大小写。 不仅仅关键字不区分大小写 ,, 密码等都不区分大小写。

有些人可能不习惯表名、字段全部用大写,而喜欢用小写或大小写混杂的形式,如果是这样的话,你在ORACLE中写脚本时就要注意了,没有处理好,这样会给你带来“无穷的麻烦”

如上所示,你必须在字段上加上””,否则这里报错,哪里起火。而人有时候又是很粗心、健忘的。所以在ORACLE中,还是建议全部用大写,这样可能开始会让你有些不爽,不过习惯了就好了。总比你用””给后面的开发带来很多隐患要好得多。

在ORAClE中,习惯脚本、字段等用大写,有人说能提高效率,这样少了强制转换大写(如果没有双引号的话)开销,也有人说这些开销可以忽略不计,不会有啥性能方面的问题。(当然脚本全部用大写一致,可以避免同一脚本由于大小写问题多次解析,这是可以肯定的)。小弟不才,也不能确定,网上这方面的资料也少,希望大家能讨论

原文链接:

【编辑推荐】


Microsoft sql server 2005连接失败

启动 SQL Server Browser 一、为 SQL 启用远程连接 1. 单击“开始”,依次指向“程序”、“Microsoft SQL Server 2005”和“配置工具”,然后单击“SQL Server 外围应用配置器”。 2. 在“SQL Server 2005 外围应用配置器”页上,单击“服务和连接的外围应用配置器”。 3. 在“服务和连接的外围应用配置器”页上,展开“数据库引擎”,依次单击“远程连接”和“本地连接和远程连接”,单击适用于您的环境的相应协议,然后单击“应用”。 注意:请在接收到以下消息时单击“确定”: 直到重新启动数据库引擎服务后,对连接设置所做的更改才会生效。 4. 在“服务和连接的外围应用配置器”页上,展开“数据库引擎”,依次单击“服务”和“停止”,等待 MSSQLSERVER 服务停止,然后单击“启动”以重新启动 MSSQLSERVER 服务。 二、启用 SQL Server Browser 服务 1. 单击“开始”,依次指向“程序”、“Microsoft SQL Server 2005”和“配置工具”,然后单击“SQL Server 外围应用配置器”。 2. 在“SQL Server 2005 外围应用配置器”页上,单击“服务和连接的外围应用配置器”。 3. 在“服务和连接的外围应用配置器”页上,单击“SQL Server Browser”,在“启动类型”中单击“自动”选项,然后单击“应用”。 注意:在单击“自动”选项后,每次启动 Microsoft Windows 时将自动启动 SQL Server Browser 服务。 4. 单击“启动”,然后单击“确定”。 三、在 Windows 防火墙中为SQL Server 2005 创建例外 1. 在 Windows 防火墙中,单击“例外”选项卡,然后单击“添加程序”。 2. 在“添加程序”窗口中,单击“浏览”。 3. 单击 C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\ 可执行程序,单击“打开”,然后单击“确定”。 注意:上述路径可能会根据 SQL Server 2005 的安装位置而不同。 四、在 Windows 防火墙中为 SQL Server Browser 服务创建例外 1. 在 Windows 防火墙中,单击“例外”选项卡,然后单击“添加程序”。 2. 在“添加程序”窗口中,单击“浏览”。 3. 单击 C:\Program Files\Microsoft SQL Server\90\Shared\ 可执行程序,单击“打开”,然后单击“确定”。 注意:上述路径可能会根据 SQL Server 2005 的安装位置而不同。 五、远程连接端口设置 1、在服务器上打开SQL Server Configuration Manager。 选择SQL Server配置治理器->SQL Server 2005网络配置->MSSQLSERVER的协议->TCP/IP,在弹出对话框中选择IP地址->IPALL->TCP端口,设置为可用端口。 (如果默认的1433端口老是连接不上,你就设置为你确认已经打开的端口试试,如21端口等) 2、在“服务和连接的外围应用配置器”页上,展开“数据库引擎”,依次单击“服务”和“停止”,等待 MSSQLSERVER 服务停止,然后单击“启动”以重新启动 MSSQLSERVER 服务。 ----如果装有sql2000,则把机子上的SQL 2000 服务关掉,再启动

c#中Dictionary怎么取回返回值

注意 检索速度取决于为 TKey 指定的类型的哈希算法的质量。

注意 例如,您可以使用 StringComparer 类提供的不区分大小写的字符串比较器来创建带不区分大小写的字符串键的字典。

openWith = new Dictionary (); // Add some elements to the dictionary. There are no // duplicate keys, but some of the values are duplicates. (txt, ); (bmp, ); (dib, ); (rtf, ); // The Add method throws an exception if the new key is // already in the dictionary. try { (txt, ); } catch (ArgumentException) { (An element with Key = \txt\ already exists.); } // The Item property is another name for the indexer, so you // can omit its name when accessing elements. (For key = \rtf\, value = {0}., openWith[rtf]); // The indexer can be used to change the value associated // with a key. openWith[rtf] = ; (For key = \rtf\, value = {0}., openWith[rtf]); // If a key does not exist, Setting the indexer for that key // adds a new key/value pair. openWith[doc] = ; // The indexer throws an exception if the requested key is // not in the dictionary. try { (For key = \tif\, value = {0}., openWith[tif]); } catch (KeyNotFoundException) { (Key = \tif\ is not found.); } // When a program often has to try keys that turn out not to // be in the dictionary, TryGetValue can be a more efficient // way to retrieve values. string value = ; if ((tif, out value)) { (For key = \tif\, value = {0}., value); } else { (Key = \tif\ is not found.); } // ContainsKey can be used to test keys before inserting // them. if (!(ht)) { (ht, ); (Value added for key = \ht\: {0}, openWith[ht]); } // When you use foreach to enumerate dictionary elements, // the elements are retrieved as KeyValuePair objects. (); foreach( KeyValuePair kvp in openWith ) { (Key = {0}, Value = {1}, , ); } // To get the values alone, use the Values property. Dictionary valueColl = ; // The elements of the ValueCollection are strongly typed // with the type that was specified for dictionary values. (); foreach( string s in valueColl ) { (Value = {0}, s); } // To get the keys alone, use the Keys property. Dictionary keyColl = ; // The elements of the KeyCollection are strongly typed // with the type that was specified for dictionary keys. (); foreach( string s in keyColl ) { (Key = {0}, s); } // Use the Remove method to remove a key/value pair. (\nRemove(\doc\)); (doc); if (!(doc)) { (Key \doc\ is not found.); } } } 看看MSDN就行了, Dictionary dc = new Dictionary (); for (int i = 0; i < ; i++) { (Key:{0} Value:{}, [i], [i]); }

12.25-1.25X3.2十0.8脱式计算,能简算的要简算,怎么算?

通过观察,能简算的是:1.25*3.2=1.25*8*0.4=10*0.4=4所以,原式:12.25-4+0.8=8.25+0.75+0.05=9+0.05=9.05请采纳谢谢

本文版权声明本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站客服,一经查实,本站将立刻删除。

发表评论

热门推荐