转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 数据库 >> ORACLE >> 正文
Oracle 和 MIcrosoft SQL 的不同         ★★★★
F1 Help on SQL Enterprise Manager Shift-F1 Help on syntax of current SQL statement Ctrl-E Execute selected text in Query Analyzer Ctrl-R Hide/show results pane in Query Analyzer

Obviously, this list is far from complete.   Please feel free to mail me your favorite shortcuts.  I''''ll add to this list as time permits.

See also: Windows Shortcut Keys

--Fred

  • SQL Generating SQL

    Last Updated: 2/7/1999
    Applies to:  MS SQL Server 6.5+

    To automate tedious database maintenance chores, you can use SQL statements to generate SQL statements that do your maintenance for you.  For example, to change the permissions on all stored procedures in a database, you can use a SELECT statement like:

    	SELECT ''''GRANT EXECUTE ON '''' + name + '''' TO PUBLIC
            	GO''''
            	FROM sysobjects
            	WHERE type = ''''P''''

    The output of this SELECT statement is a series of alternating GRANT and GO statements, one pair per stored procedures, for all stored procedures in the database.  Then you copy that output as your next set of commands and execute it. 

    Note:  Be sure to leave the line break before the word GO. It is required to start on a new line, after the GRANT statement.

    Thanks to Steve Rhoads for this tip.

    --Fred

  • See Also

    Last Updated: 6/6/1999
    Applies to:  MS SQL Server 6.5+

    The following are good sources of info about MS SQL Server:

    1. MS SQL Server books on the MSDN Library CD.

    --Fred

  • Differences Between Oracle and MS SQL Se

    [1] [2] [3]  下一页


    [Access]sql随机抽取记录  [Access]ASP&SQL让select查询结果随机排序的实现方法
    [办公软件]RIGHT函数和逻辑与&和Value函数在Excel中的应用举…  [电脑技术]使用?和*两个通配符迅速批量(搜索)查找文件
    [聊天工具]Microsoft Office 2007简体中文版最新截图  [系统软件]EXP-00008: ORACLE error 904 encountered的解决方…
    [系统软件]delphi2005帮助系统使用了microsoft document exp…  [系统软件]SQL语句性能优化--LECCO SQL Expert
    [常用软件]PB7 连接 Oracle 的配置方法  [C语言系列]SQL Server到DB2连接服务器的实现


  • Oracle 和 MIcrosoft SQL 的不同

    作者:闵涛 文章来源:闵涛的学习笔记 点击数:2822 更新时间:2009/4/22 22:05:26

    还是有很多的不同,转贴如下:http://www.bristle.com/Tips/SQL.htm#Oracle%20Tips

     

    Table of Contents:

    1. Oracle Tips
      1. SQL Tips
        1. SELECT * and more
        2. Materialized View
      2. PL/SQL Tips
      3. SQL Navigator Tips
      4. See Also
    2. MS SQL Server Tips
      1. SQL Tips
        1. Dynamic SQL in a Stored Procedure
      2. SQL Enterprise Manager Tips
        1. Keyboard Shortcuts
        2. SQL Generating SQL
      3. See Also
    3. Differences Between Oracle and MS SQL Server
      1. Concepts and Terminology
      2. Data Types
      3. Limits
      4. Operators
      5. Built-In Functions
      6. Differences in SQL Syntax
      7. Differences in SQL Semantics
      8. Differences in Managing Databases
      9. Differences in Managing Database Objects
      10. Differences in Managing Users
      11. Differences in Integration with MS ADO, RDO, etc.
      12. Miscellaneous Differences
      13. See Also

    Details of Tips:

    1. Oracle Tips

      1. SQL Tips

        This section contains tips on standard SQL (Structured Query Language) statements in Oracle.

        1. SELECT * and more

          Last Updated: 6/6/1999
          Applies to:  Oracle 7.3, 8 (and probably earlier versions)

          To select all columns of a table:

          	select * from table

          However, to select all real columns, plus a pseudo-column like "user":

          	select table.*, user from table

          The following does not work:

          	select *, user from table

          --Fred

        2. Materialized View

          Last Updated: 1/7/2002
          Applies to:  Oracle 8+

          Oracle 8i introduced a new feature called a "materialized view".  You define it just like any other view, except that you add the keyword MATERIALIZED:

          	CREATE MATERIALIZED VIEW view_name

          A materialized view is like a combination of a table and a view.  Like a view, it is defined as a logical view into the data of one or more tables.  When you update the tables, subsequent queries of the view see the updated data.  However, like a table, its data is stored in the database.  Also, like a table, it is faster if you define indexes for it.

          A regular view is stored as a mapping of data from tables.  When you modify the data in the tables, the view is completely ignored.  When you access the view, it joins the data currently in the tables, and returns the data you requested.  A materialized view is stored as such a mapping along with a copy of the actual data from the tables.  When you modify the data in the tables, the view''''s copy of the data is also updated.  When you access the view, the data is drawn directly from the copy.

          Thus a materialized view makes table updates a little slower, but makes view queries much faster.  It also consumes additional space in the database.

          You could accomplish the same effect by defining an additional table instead of the view, and using triggers on the component tables to update it each time they are changed.  However, using a materialized view is more convenient, more efficient, and clearer to the next person who has to maintain your database.

          Thanks to Andy Glick for sending me a sample of a materialized view from his application!

          --Fred

      2. PL/SQL Tips

        This section contains tips on PL/SQL statements -- the Oracle "procedural language" superset of SQL that you use to write stored procedures.

      3. SQL Navigator Tips

        This section contains tips on the SQL Navigator tool by Quest Systems. It is a graphical front end to the Oracle database, allowing you to create, delete, view, and modify all Oracle objects: tables, views, stored procedures, etc.

      4. See Also

        Last Updated: 6/6/1999
        Applies to:  Oracle 7.3+

        The following are good sources of info about Oracle:

        1. Koch, George, and Kevin Loney. Oracle 8, The Complete Reference.  Berkeley CA: For Oracle Press by Osborne McGraw-Hill, 1997.  ISBN 0-07-882396-X.
          This book includes introductory database concepts as well as a complete reference to Oracle SQL and PL/SQL statements.  The companion CD contains a complete copy of the book, so you can read it on-line, search it, etc.
        2. Any of the O''''Reilly books.  I''''ve been very impressed by all of the O''''Reilly books since my early Unix and X-Windows days in the 80''''s, and they have a complete series on Oracle, covering PL/SQL, the standard packages, etc.

        --Fred

    2. MS SQL Server Tips

      1. SQL Tips

        This section contains tips on SQL (Structured Query Language) statements in MS SQL Server.

        1. Dynamic SQL in a Stored Procedure

          Last Updated: 2/7/1999
          Applies to:  MS SQL Server 6.5+

          A typical tradeoff for a database application is dynamic SQL (SQL commands embedded in the application -- for flexibility) vs. stored procedures (pre-compiled SQL procedures stored in the database and invoked by name from the application -- for speed and control over what SQL statements get executed).   However, you can have the best of both worlds by using dynamic SQL inside your stored procedures.  In a stored procedure, you can use the EXEC statement to execute a string of SQL statements that you built dynamically in the stored procedure or read from the database or any other data source.

          Thanks to Steve Rhoads for this tip.

          --Fred

      2. SQL Enterprise Manager Tips

        This section contains tips on the SQL Enterprise Manager tool. It is a graphical front end to the database, allowing you to create, delete, view, and modify all MS SQL Server objects: tables, views, stored procedures, etc.

        1. Keyboard Shortcuts

          Last Updated: 6/20/1999
          Applies to:  MS SQL Server 7.0

          Here is a list of some of the more useful shortcut keys in SQL Enterprise Manager.

    Key Function
    教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Sql Server  · MySql
    · Access  · ORACLE
    · SyBase  · 其他
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台