SQL Reference for Cross-Platform Development - Version 5 Ii SQL Reference for Cross-Platform Development - Version 5 Contents

Total Page:16

File Type:pdf, Size:1020Kb

SQL Reference for Cross-Platform Development - Version 5 Ii SQL Reference for Cross-Platform Development - Version 5 Contents SQL Reference for Cross-Platform Development - Version 5 ii SQL Reference for Cross-Platform Development - Version 5 Contents Chapter 1. About this book ......1 CONNECT (Type 1) and CONNECT (Type 2) . 37 Who should read this book .........1 Remote unit of work ..........37 How to use this book ...........2 Application-directed distributed unit of work . 39 Assumptions relating to examples of SQL Data representation considerations......42 statements ..............2 How to read the syntax diagrams ......3 Chapter 3. Language elements ....43 Conventions used in this manual ......5 Characters ...............43 SQL accessibility ............5 Tokens ................44 Related documentation ..........6 Identifiers ...............46 What's new for this book ..........8 SQL identifiers ............46 Host identifiers ............46 Chapter 2. Concepts .........9 Naming conventions ...........47 Relational database ............9 SQL path ..............52 Structured query language..........9 Qualification of unqualified object names . 52 Static SQL ..............9 Aliases ................54 Dynamic SQL .............9 Authorization IDs and authorization names . 55 Interactive SQL ............10 Example ..............55 SQL call level interface and open database Data types...............56 connectivity .............10 Nulls ...............57 Java database connectivity and embedded SQL Numbers ..............57 for Java programs ...........10 Character strings ...........60 Schemas ...............11 Character encoding schemes........61 Tables ................11 Graphic strings ............62 Keys................11 Graphic encoding schemes ........63 Constraints .............12 Binary strings ............63 Indexes ...............15 Large objects .............63 Triggers ..............15 Datetime values ............65 Views ................17 XML Values .............69 User-defined types ............17 User-defined types ...........70 Aliases ................18 Promotion of data types ..........72 Packages and access plans .........18 Casting between data types .........74 Routines ...............18 Assignments and comparisons ........77 Functions ..............18 Numeric assignments ..........78 Procedures .............19 String assignments ...........80 Sequences ...............20 Datetime assignments ..........83 Authorization, privileges and object ownership . 21 XML assignments ...........84 || Row permissions and column masks .....23 Distinct type assignments.........84 Catalog ................24 || Array type assignments .........86 Application processes, concurrency, and recovery. 24 Assignments to LOB locators .......86 Locking, commit, and rollback .......24 Numeric comparisons ..........86 Unit of work .............25 String comparisons ...........87 Rolling back work ...........26 Datetime comparisons ..........89 Isolation level .............28 XML comparisons ...........89 Repeatable read ............29 Distinct type comparisons ........89 Read stability.............29 || Array type comparisons .........90 Cursor stability ............30 Rules for result data types .........91 Uncommitted read ...........30 Numeric operands ...........91 Comparison of isolation levels .......30 Character and graphic string operands ....92 Storage structures ............31 Binary string operands .........93 Character conversion ...........31 Datetime operands ...........93 Character sets and code pages .......34 Distinct type operands..........94 Coded character sets and CCSIDs ......35 XML operands ............94 Default CCSID ............35 Conversion rules for operations that combine strings 95 Distributed relational database ........36 Constants ...............97 Application servers ...........36 Integer constants ...........97 iii Decimal constants ...........97 Predicates ..............163 Floating-point constants .........97 Basic predicate ............164 Decimal floating-point constants ......98 Quantified predicate ..........166 Character-string constants ........98 BETWEEN predicate ..........168 Graphic-string constants .........99 EXISTS predicate ...........169 Datetime constants ...........99 IN predicate .............170 Decimal point ............100 LIKE predicate ............172 Special registers ............101 NULL predicate ...........177 CURRENT CLIENT_ACCTNG ......101 Search conditions ............178 CURRENT CLIENT_APPLNAME .....102 Examples..............178 CURRENT CLIENT_USERID .......102 CURRENT CLIENT_WRKSTNNAME ....102 || Chapter 4. Built-in global variables 181 CURRENT DATE ...........102 || CLIENT_IPADDR ............182 CURRENT DECFLOAT ROUNDING MODE 103 || PACKAGE_NAME ...........183 CURRENT DEGREE ..........104 || PACKAGE_SCHEMA ..........184 CURRENT PATH ...........104 || PACKAGE_VERSION ..........185 CURRENT SCHEMA ..........105 CURRENT SERVER ..........105 Chapter 5. Built-in functions .....187 CURRENT TIME ...........105 Aggregate functions ...........195 CURRENT TIMESTAMP ........106 || ARRAY_AGG ............196 CURRENT TIMEZONE .........106 AVG...............198 SESSION_USER ...........106 COUNT ..............200 USER ...............106 COUNT_BIG ............201 Column names .............108 || GROUPING .............202 Qualified column names.........108 MAX...............204 Correlation names ...........108 MIN...............205 Column name qualifiers to avoid ambiguity . 110 STDDEV ..............206 Column name qualifiers in correlated references 112 SUM...............207 Unqualified column names in correlated VARIANCE or VAR ..........208 references..............113 XMLAGG .............209 Variables ...............114 Scalar functions.............211 || Global variables ...........114 Example ..............211 References to host variables .......116 ABS...............212 Variables in dynamic SQL ........118 ACOS ...............213 References to LOB variables .......119 ADD_MONTHS ...........214 References to LOB locator variables .....119 ASCII ...............216 References to LOB file reference variables . 120 ASIN ...............217 References to XML variables .......120 ATAN...............218 Host structures ............121 ATANH..............219 Functions...............123 ATAN2..............220 Types of functions ...........123 BIGINT ..............221 Function invocation ..........124 BITAND, BITANDNOT, BITOR, BITXOR, and Function resolution ..........124 BITNOT ..............222 Determining the best fit .........126 BLOB ...............224 Best fit considerations .........128 || CARDINALITY ...........225 Expressions ..............130 CEILING ..............226 Without operators ...........130 CHAR...............227 With arithmetic operators ........131 CHARACTER_LENGTH ........233 With the concatenation operator ......134 CLOB ...............234 Scalar fullselect ............136 COALESCE .............236 Datetime operands and durations .....137 COMPARE_DECFLOAT .........237 Datetime arithmetic in SQL........138 CONCAT..............239 Precedence of operations ........142 CONTAINS .............240 || ARRAY constructor ..........144 COS...............243 || ARRAY element specification .......145 COSH ...............244 CASE expressions ...........146 DATE...............245 CAST specification ..........149 DAY...............247 OLAP specification ..........153 DAYNAME .............248 ROW CHANGE expression........157 DAYOFWEEK ............249 Sequence reference ..........158 DAYOFWEEK_ISO ..........250 XMLCAST specification .........162 iv SQL Reference for Cross-Platform Development - Version 5 DAYOFYEAR ............251 REAL ...............344 DAYS...............252 REPEAT ..............345 DBCLOB ..............253 REPLACE .............347 DECFLOAT .............255 RID...............349 DECIMAL or DEC ..........257 RIGHT ..............350 DECRYPT_BIT and DECRYPT_CHAR ....260 ROUND ..............352 DEGREES .............262 ROUND_TIMESTAMP .........354 DIFFERENCE ............263 || RPAD...............357 DIGITS ..............264 RTRIM ..............360 DOUBLE_PRECISION or DOUBLE .....265 SCORE ..............361 ENCRYPT .............267 SECOND ..............364 EXP...............270 SIGN ...............366 EXTRACT .............271 SIN................367 FLOAT ..............273 SINH ...............368 FLOOR ..............274 SMALLINT .............369 GENERATE_UNIQUE .........275 SOUNDEX .............370 GETHINT .............276 SPACE..............371 GRAPHIC .............277 SQRT...............372 HEX...............280 STRIP ...............373 HOUR...............281 SUBSTR ..............375 IDENTITY_VAL_LOCAL ........282 SUBSTRING.............378 INSERT ..............287 TAN...............380 INTEGER or INT ...........289 TANH...............381 JULIAN_DAY ............291 TIME ...............382 LAST_DAY .............292 TIMESTAMP ............383 LCASE ..............293 TIMESTAMP_FORMAT .........385 LEFT ...............294 TIMESTAMP_ISO ...........388 LENGTH ..............295 TIMESTAMPDIFF ...........389 LN................296 TOTALORDER ............392 LOCATE ..............297 TRANSLATE ............393 LOG10 ..............299 TRIM ...............395 LOWER ..............300 || TRIM_ARRAY ............397 || LPAD...............301 TRUNCATE or TRUNC .........398 LTRIM ..............304 TRUNC_TIMESTAMP .........400 MAX...............305 UCASE ..............401 || MAX_CARDINALITY .........306 UPPER ..............402 MICROSECOND ...........307 VALUE ..............403 MIDNIGHT_SECONDS .........308 VARCHAR .............404 MIN...............309 VARCHAR_FORMAT .........409 MINUTE ..............310 VARGRAPHIC

  1202
Recommended publications
  • IBM Developer for Z/OS Enterprise Edition
    Solution Brief IBM Developer for z/OS Enterprise Edition A comprehensive, robust toolset for developing z/OS applications using DevOps software delivery practices Companies must be agile to respond to market demands. The digital transformation is a continuous process, embracing hybrid cloud and the Application Program Interface (API) economy. To capitalize on opportunities, businesses must modernize existing applications and build new cloud native applications without disrupting services. This transformation is led by software delivery teams employing DevOps practices that include continuous integration and continuous delivery to a shared pipeline. For z/OS Developers, this transformation starts with modern tools that empower them to deliver more, faster, with better quality and agility. IBM Developer for z/OS Enterprise Edition is a modern, robust solution that offers the program analysis, edit, user build, debug, and test capabilities z/OS developers need, plus easy integration with the shared pipeline. The challenge IBM z/OS application development and software delivery teams have unique challenges with applications, tools, and skills. Adoption of agile practices Application modernization “DevOps and agile • Mainframe applications • Applications require development on the platform require frequent updates access to digital services have jumped from the early adopter stage in 2016 to • Development teams must with controlled APIs becoming common among adopt DevOps practices to • The journey to cloud mainframe businesses”1 improve their
    [Show full text]
  • Querying Graph Databases: What Do Graph Patterns Mean?
    Querying Graph Databases: What Do Graph Patterns Mean? Stephan Mennicke1( ), Jan-Christoph Kalo2, and Wolf-Tilo Balke2 1 Institut für Programmierung und Reaktive Systeme, TU Braunschweig, Germany [email protected] 2 Institut für Informationssysteme, TU Braunschweig, Germany {kalo,balke}@ifis.cs.tu-bs.de Abstract. Querying graph databases often amounts to some form of graph pattern matching. Finding (sub-)graphs isomorphic to a given graph pattern is common to many graph query languages, even though graph isomorphism often is too strict, since it requires a one-to-one cor- respondence between the nodes of the pattern and that of a match. We investigate the influence of weaker graph pattern matching relations on the respective queries they express. Thereby, these relations abstract from the concrete graph topology to different degrees. An extension of relation sequences, called failures which we borrow from studies on con- current processes, naturally expresses simple presence conditions for rela- tions and properties. This is very useful in application scenarios dealing with databases with a notion of data completeness. Furthermore, fail- ures open up the query modeling for more intricate matching relations directly incorporating concrete data values. Keywords: Graph databases · Query modeling · Pattern matching 1 Introduction Over the last years, graph databases have aroused a vivid interest in the database community. This is partly sparked by intelligent and quite robust developments in information extraction, partly due to successful standardizations for knowl- edge representation in the Semantic Web. Indeed, it is enticing to open up the abundance of unstructured information on the Web through transformation into a structured form that is usable by advanced applications.
    [Show full text]
  • Insert - Sql Insert - Sql
    INSERT - SQL INSERT - SQL INSERT - SQL Common Set Syntax: INSERT INTO table-name (*) [VALUES-clause] [(column-list)] VALUE-LIST Extended Set Syntax: INSERT INTO table-name (*) [OVERRIDING USER VALUE] [VALUES-clause] [(column-list)] [OVERRIDING USER VALUE] VALUE-LIST This chaptercovers the following topics: Function Syntax Description Example For an explanation of the symbols used in the syntax diagram, see Syntax Symbols. Belongs to Function Group: Database Access and Update Function The SQL INSERT statement is used to add one or more new rows to a table. Syntax Description Syntax Element Description INTO table-name INTO Clause: In the INTO clause, the table is specified into which the new rows are to be inserted. See further information on table-name. 1 INSERT - SQL Syntax Description Syntax Element Description column-list Column List: Syntax: column-name... In the column-list, one or more column-names can be specified, which are to be supplied with values in the row currently inserted. If a column-list is specified, the sequence of the columns must match with the sequence of the values either specified in the insert-item-list or contained in the specified view (see below). If the column-list is omitted, the values in the insert-item-list or in the specified view are inserted according to an implicit list of all the columns in the order they exist in the table. VALUES-clause Values Clause: With the VALUES clause, you insert a single row into the table. See VALUES Clause below. insert-item-list INSERT Single Row: In the insert-item-list, you can specify one or more values to be assigned to the columns specified in the column-list.
    [Show full text]
  • Sql Create Table Variable from Select
    Sql Create Table Variable From Select Do-nothing Dory resurrect, his incurvature distasting crows satanically. Sacrilegious and bushwhacking Jamey homologising, but Harcourt first-hand coiffures her muntjac. Intertarsal and crawlier Towney fanes tenfold and euhemerizing his assistance briskly and terrifyingly. How to clean starting value inside of data from select statements and where to use matlab compiler to store sql, and then a regular join You may not supported for that you are either hive temporary variable table. Before we examine the specific methods let's create an obscure procedure. INSERT INTO EXEC sql server exec into table. Now you can show insert update delete and invent all operations with building such as in pay following a write i like the Declare TempTable. When done use t or t or when to compact a table variable t. Procedure should create the temporary tables instead has regular tables. Lesson 4 Creating Tables SQLCourse. EXISTS tmp GO round TABLE tmp id int NULL SELECT empire FROM. SQL Server How small Create a Temp Table with Dynamic. When done look sir the Execution Plan save the SELECT Statement SQL Server is. Proc sql create whole health will select weight married from myliboutdata ORDER to weight ASC. How to add static value while INSERT INTO with cinnamon in a. Ssrs invalid object name temp table. Introduction to Table Variable Deferred Compilation SQL. How many pass the bash array in 'right IN' clause will select query. Creating a pope from public Query Vertica. Thus attitude is no performance cost for packaging a SELECT statement into an inline.
    [Show full text]
  • SQL Standards Update 1
    2017-10-20 SQL Standards Update 1 SQL STANDARDS UPDATE Keith W. Hare SC32 WG3 Convenor JCC Consulting, Inc. October 20, 2017 2017-10-20 SQL Standards Update 2 Introduction • What is SQL? • Who Develops the SQL Standards • A brief history • SQL 2016 Published • SQL Technical Reports • What's next? • SQL/MDA • Streaming SQL • Property Graphs • Summary 2017-10-20 SQL Standards Update 3 Who am I? • Senior Consultant with JCC Consulting, Inc. since 1985 • High performance database systems • Replicating data between database systems • SQL Standards committees since 1988 • Convenor, ISO/IEC JTC1 SC32 WG3 since 2005 • Vice Chair, ANSI INCITS DM32.2 since 2003 • Vice Chair, INCITS Big Data Technical Committee since 2015 • Education • Muskingum College, 1980, BS in Biology and Computer Science • Ohio State, 1985, Masters in Computer & Information Science 2017-10-20 SQL Standards Update 4 What is SQL? • SQL is a language for defining databases and manipulating the data in those databases • SQL Standard uses SQL as a name, not an acronym • Might stand for SQL Query Language • SQL queries are independent of how the data is actually stored – specify what data you want, not how to get it 2017-10-20 SQL Standards Update 5 Who Develops the SQL Standards? In the international arena, the SQL Standard is developed by ISO/ IEC JTC1 SC32 WG3. • Officers: • Convenor – Keith W. Hare – USA • Editor – Jim Melton – USA • Active participants are: • Canada – Standards Council of Canada • China – Chinese Electronics Standardization Institute • Germany – DIN Deutsches
    [Show full text]
  • Alias for Case Statement in Oracle
    Alias For Case Statement In Oracle two-facedly.FonsieVitric Connie shrieved Willdon reconnects his Carlenegrooved jimply discloses her and pyrophosphates mutationally, knavishly, butshe reticularly, diocesan flounces hobnail Kermieher apache and never reddest. write disadvantage person-to-person. so Column alias can be used in GROUP a clause alone is different to promote other database management systems such as Oracle and SQL Server See Practice 6-1. Kotlin performs for example, in for alias case statement. If more want just write greater Less evident or butter you fuck do like this equity Case When ColumnsName 0 then 'value1' When ColumnsName0 Or ColumnsName. Normally we mean column names using the create statement and alias them in shape if. The logic to behold the right records is in out CASE statement. As faceted search string manipulation features and case statement in for alias oracle alias? In the following examples and managing the correct behaviour of putting each for case of a prefix oracle autonomous db driver to select command that updates. The four lines with the concatenated case statement then the alias's will work. The following expression jOOQ. Renaming SQL columns based on valve position Modern SQL. SQLite CASE very Simple CASE & Search CASE. Alias on age line ticket do I pretend it once the same path in the. Sql and case in. Gke app to extend sql does that alias for case statement in oracle apex jobs in cases, its various points throughout your. Oracle Creating Joins with the USING Clause w3resource. Multi technology and oracle alias will look further what we get column alias for case statement in oracle.
    [Show full text]
  • Look out the Window Functions and Free Your SQL
    Concepts Syntax Other Look Out The Window Functions and free your SQL Gianni Ciolli 2ndQuadrant Italia PostgreSQL Conference Europe 2011 October 18-21, Amsterdam Look Out The Window Functions Gianni Ciolli Concepts Syntax Other Outline 1 Concepts Aggregates Different aggregations Partitions Window frames 2 Syntax Frames from 9.0 Frames in 8.4 3 Other A larger example Question time Look Out The Window Functions Gianni Ciolli Concepts Syntax Other Aggregates Aggregates 1 Example of an aggregate Problem 1 How many rows there are in table a? Solution SELECT count(*) FROM a; • Here count is an aggregate function (SQL keyword AGGREGATE). Look Out The Window Functions Gianni Ciolli Concepts Syntax Other Aggregates Aggregates 2 Functions and Aggregates • FUNCTIONs: • input: one row • output: either one row or a set of rows: • AGGREGATEs: • input: a set of rows • output: one row Look Out The Window Functions Gianni Ciolli Concepts Syntax Other Different aggregations Different aggregations 1 Without window functions, and with them GROUP BY col1, . , coln window functions any supported only PostgreSQL PostgreSQL version version 8.4+ compute aggregates compute aggregates via by creating groups partitions and window frames output is one row output is one row for each group for each input row Look Out The Window Functions Gianni Ciolli Concepts Syntax Other Different aggregations Different aggregations 2 Without window functions, and with them GROUP BY col1, . , coln window functions only one way of aggregating different rows in the same for each group
    [Show full text]
  • How to Get Data from Oracle to Postgresql and Vice Versa Who We Are
    How to get data from Oracle to PostgreSQL and vice versa Who we are The Company > Founded in 2010 > More than 70 specialists > Specialized in the Middleware Infrastructure > The invisible part of IT > Customers in Switzerland and all over Europe Our Offer > Consulting > Service Level Agreements (SLA) > Trainings > License Management How to get data from Oracle to PostgreSQL and vice versa 19.06.2020 Page 2 About me Daniel Westermann Principal Consultant Open Infrastructure Technology Leader +41 79 927 24 46 daniel.westermann[at]dbi-services.com @westermanndanie Daniel Westermann How to get data from Oracle to PostgreSQL and vice versa 19.06.2020 Page 3 How to get data from Oracle to PostgreSQL and vice versa Before we start We have a PostgreSQL user group in Switzerland! > https://www.swisspug.org Consider supporting us! How to get data from Oracle to PostgreSQL and vice versa 19.06.2020 Page 4 How to get data from Oracle to PostgreSQL and vice versa Before we start We have a PostgreSQL meetup group in Switzerland! > https://www.meetup.com/Switzerland-PostgreSQL-User-Group/ Consider joining us! How to get data from Oracle to PostgreSQL and vice versa 19.06.2020 Page 5 Agenda 1.Past, present and future 2.SQL/MED 3.Foreign data wrappers 4.Demo 5.Conclusion How to get data from Oracle to PostgreSQL and vice versa 19.06.2020 Page 6 Disclaimer This session is not about logical replication! If you are looking for this: > Data Replicator from DBPLUS > https://blog.dbi-services.com/real-time-replication-from-oracle-to-postgresql-using-data-replicator-from-dbplus/
    [Show full text]
  • SQL and Management of External Data
    SQL and Management of External Data Jan-Eike Michels Jim Melton Vanja Josifovski Oracle, Sandy, UT 84093 Krishna Kulkarni [email protected] Peter Schwarz Kathy Zeidenstein IBM, San Jose, CA {janeike, vanja, krishnak, krzeide}@us.ibm.com [email protected] SQL/MED addresses two aspects to the problem Guest Column Introduction of accessing external data. The first aspect provides the ability to use the SQL interface to access non- In late 2000, work was completed on yet another part SQL data (or even SQL data residing on a different of the SQL standard [1], to which we introduced our database management system) and, if desired, to join readers in an earlier edition of this column [2]. that data with local SQL data. The application sub- Although SQL database systems manage an mits a single SQL query that references data from enormous amount of data, it certainly has no monop- multiple sources to the SQL-server. That statement is oly on that task. Tremendous amounts of data remain then decomposed into fragments (or requests) that are in ordinary operating system files, in network and submitted to the individual sources. The standard hierarchical databases, and in other repositories. The does not dictate how the query is decomposed, speci- need to query and manipulate that data alongside fying only the interaction between the SQL-server SQL data continues to grow. Database system ven- and foreign-data wrapper that underlies the decompo- dors have developed many approaches to providing sition of the query and its subsequent execution. We such integrated access. will call this part of the standard the “wrapper inter- In this (partly guested) article, SQL’s new part, face”; it is described in the first half of this column.
    [Show full text]
  • Chapter 11 Querying
    Oracle TIGHT / Oracle Database 11g & MySQL 5.6 Developer Handbook / Michael McLaughlin / 885-8 Blind folio: 273 CHAPTER 11 Querying 273 11-ch11.indd 273 9/5/11 4:23:56 PM Oracle TIGHT / Oracle Database 11g & MySQL 5.6 Developer Handbook / Michael McLaughlin / 885-8 Oracle TIGHT / Oracle Database 11g & MySQL 5.6 Developer Handbook / Michael McLaughlin / 885-8 274 Oracle Database 11g & MySQL 5.6 Developer Handbook Chapter 11: Querying 275 he SQL SELECT statement lets you query data from the database. In many of the previous chapters, you’ve seen examples of queries. Queries support several different types of subqueries, such as nested queries that run independently or T correlated nested queries. Correlated nested queries run with a dependency on the outer or containing query. This chapter shows you how to work with column returns from queries and how to join tables into multiple table result sets. Result sets are like tables because they’re two-dimensional data sets. The data sets can be a subset of one table or a set of values from two or more tables. The SELECT list determines what’s returned from a query into a result set. The SELECT list is the set of columns and expressions returned by a SELECT statement. The SELECT list defines the record structure of the result set, which is the result set’s first dimension. The number of rows returned from the query defines the elements of a record structure list, which is the result set’s second dimension. You filter single tables to get subsets of a table, and you join tables into a larger result set to get a superset of any one table by returning a result set of the join between two or more tables.
    [Show full text]
  • Sql Server to Aurora Postgresql Migration Playbook
    Microsoft SQL Server To Amazon Aurora with Post- greSQL Compatibility Migration Playbook 1.0 Preliminary September 2018 © 2018 Amazon Web Services, Inc. or its affiliates. All rights reserved. Notices This document is provided for informational purposes only. It represents AWS’s current product offer- ings and practices as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS’s products or services, each of which is provided “as is” without war- ranty of any kind, whether express or implied. This document does not create any warranties, rep- resentations, contractual commitments, conditions or assurances from AWS, its affiliates, suppliers or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agree- ments, and this document is not part of, nor does it modify, any agreement between AWS and its cus- tomers. - 2 - Table of Contents Introduction 9 Tables of Feature Compatibility 12 AWS Schema and Data Migration Tools 20 AWS Schema Conversion Tool (SCT) 21 Overview 21 Migrating a Database 21 SCT Action Code Index 31 Creating Tables 32 Data Types 32 Collations 33 PIVOT and UNPIVOT 33 TOP and FETCH 34 Cursors 34 Flow Control 35 Transaction Isolation 35 Stored Procedures 36 Triggers 36 MERGE 37 Query hints and plan guides 37 Full Text Search 38 Indexes 38 Partitioning 39 Backup 40 SQL Server Mail 40 SQL Server Agent 41 Service Broker 41 XML 42 Constraints
    [Show full text]
  • Using the Set Operators Questions
    UUSSIINNGG TTHHEE SSEETT OOPPEERRAATTOORRSS QQUUEESSTTIIOONNSS http://www.tutorialspoint.com/sql_certificate/using_the_set_operators_questions.htm Copyright © tutorialspoint.com 1.Which SET operator does the following figure indicate? A. UNION B. UNION ALL C. INTERSECT D. MINUS Answer: A. Set operators are used to combine the results of two ormore SELECT statements.Valid set operators in Oracle 11g are UNION, UNION ALL, INTERSECT, and MINUS. When used with two SELECT statements, the UNION set operator returns the results of both queries.However,if there are any duplicates, they are removed, and the duplicated record is listed only once.To include duplicates in the results,use the UNION ALL set operator.INTERSECT lists only records that are returned by both queries; the MINUS set operator removes the second query's results from the output if they are also found in the first query's results. INTERSECT and MINUS set operations produce unduplicated results. 2.Which SET operator does the following figure indicate? A. UNION B. UNION ALL C. INTERSECT D. MINUS Answer: B. UNION ALL Returns the combined rows from two queries without sorting or removing duplicates. sql_certificate 3.Which SET operator does the following figure indicate? A. UNION B. UNION ALL C. INTERSECT D. MINUS Answer: C. INTERSECT Returns only the rows that occur in both queries' result sets, sorting them and removing duplicates. 4.Which SET operator does the following figure indicate? A. UNION B. UNION ALL C. INTERSECT D. MINUS Answer: D. MINUS Returns only the rows in the first result set that do not appear in the second result set, sorting them and removing duplicates.
    [Show full text]