SQL_Quiz-Y

54
Topic Question SQL SQL SQL SQL SQL SQL SQL SQL SQL Which statement is true? SQL SQL UNIQUE database constraint accepts SQL Below is used to delete duplicate rows from a table SQL CONNECT BY is used to SQL Below is a pseudo column SQL SQL Loader SQL SQL GREATEST oracle function works on Which of the following texts below is a SQL statement that allows you to add a DEFAULT value for a column to a particular table CREATE table Test ( col1 NUMBER PRIMARY KEY , col2 NUMBER UNIQUE , col3 char(4) DEFAULT 1234 , col4 DATE DEFAULT 01-01-2011); Why does the CREATE statement fail? Which statement is true about sequences created in a single instance database? CREATE TABLE products (product_id NUMBER(6) CONSTRAINT prod_id_pk PRIMARY KEY, product_name VARCHAR2(15)); Which statement is true regarding the PROD_ID_PK constraint? CREATE SEQUENCE seq1 START WITH 100 INCREMENT BY 10 MAXVALUE 200 CYCLE NOCACHE; The sequence seq1 has generated numbers up to the maximum limit of 200. You issue the following SQL statement: SELECT seq1.nextval FROM dual; What is displayed by the SELECT statement? datatype

description

SQL_Quiz-Y

Transcript of SQL_Quiz-Y

Sheet1TopicQuestionOptionsAnswerOption1Option2Option3Option4Option5AnswerSQLWhich of the following texts below is a SQL statement that allows you to add a DEFAULT value for a column to a particular tableUPDATE TABLEUPDATE TABLESET DEFAULTALTER TABLEALTER COLUMNMODIFY COLUMN3SQLSET DEFAULTSQLALTER TABLExSQLALTER COLUMNSQLMODIFY COLUMNSQLCREATE table Test (col1 NUMBER PRIMARY KEY, col2 NUMBER UNIQUE, col3 char(4) DEFAULT 1234, col4 DATE DEFAULT 01-01-2011);Why does the CREATE statement fail?A DATE field cannot have a numeric defaultNumber column cannot be defined as UNIQUEA Char field cannot have a numeric defaultA number column cannot be a primary keyNone of the above1SQLWhich statement is true about sequences created in a single instance database?The numbers generated by a sequence can be used only for one tableDELETE would remove a sequence from the databaseCURRVAL is used to refer to the last sequence number that has been generatedWhen a database instance shuts down abnormally, the sequence numbers that have been cached but not used would be available once again when the database instance is restarted3SQLEvaluate the CREATE TABLE statement:

CREATE TABLE products(product_id NUMBER(6) CONSTRAINT prod_id_pk PRIMARY KEY,product_name VARCHAR2(15));Which statement is true regarding the PROD_ID_PK constraint?It would be created only if a unique index is manually created first.It would be created and would use and automatically created unique indexIt would be created and would use an automatically created no unique indexIt would be created and remains in a disabled state because no index is specified in the command2SQLWhich statement is true?The USER_SYNONYMS view can provide information about private synonymsThe user SYSTEM owns all the base tables and user-accessible views of the data dictionaryAll the dynamic performance views prefixed with V$ are accessible to all the database usersThe USER_OBJECTS view can provide information about the tables and views created by the user only1SQLEvaluate the following CREATE SEQUENCE statement:CREATE SEQUENCE seq1START WITH 100INCREMENT BY 10MAXVALUE 200CYCLENOCACHE;The sequence seq1 has generated numbers up to the maximum limit of 200. You issue the following SQL statement:SELECT seq1.nextval FROM dual;What is displayed by the SELECT statement?110100an error1SQLUNIQUE database constraint acceptsDuplicate Valuesonly one NULLany number of NULLSnone of the above3SQLBelow is used to delete duplicate rows from a tableROWNUMDISTINCTROWIDnone of the above3SQLCONNECT BY is used toJoin two different tablesto specify relation between parent and child rowsto specify connection between two tablesnone of the above2SQLBelow is a pseudo columnCURRVALLEVELNEXTVALROWNUMall of the above5SQLSQL Loaderis oracle utilityis oracle commandis oracle functionis a third party file loading software1SQLBelow Oracle function can only be used on NUMBER datatypeCOUNTMINAVGMAX3SQLGREATEST oracle function works onNUMBER datatypeDATE datatypeCHAR datatypeAll of the above4SQLHIREDATE is a (date type) column in Employees table and we need to select data for employees got hired in the month of December. Which of the following can be used?EXTRACT FunctionTO_CHAR FunctionTO_DATE FunctionOption 1 & 2None of the above4SQLAtleast how many join conditions are needed to join 3 tables in oracle to avoid cartesian productOne join conditionTwo join conditionsThree join conditionsFour join conditionsNone of the above2SQLWhich statement is true regarding the EXISTS operator used in the correlated subqueries?The outer stops evaluating the result set of the inner query when the first value is foundIt is used to test whether the values retrieved by the inner query exist in the result of the outer queryThe outer query continues evaluating the result set of the inner query until all the values in the result set are processednone of the above1SQLA non-correlated subquery can be defined as_____a set of sequential queries, all of which must always return a single valuea set of sequential queries, all of which must return values from the same tablea SELECT statement that can be embedded in a clause of another SELECT statement onlya set of one or more sequential queries in which generally the result of the inner query is used as the search value in the outer query4SQLWhich statement is true regarding the hierarchical query in Oracle Database?It is possible to retrieve data only in top-down hierarchyIt is possible to retrieve data in top-down & bottom-up hierarchyYou cannot specify conditions when you retrieve data by using a hierarchical queryHierarchy can have only one root value2SQLWhich statement is true regarding views?A simple view in which column aliases have been used cannot be updatedThe WITH CHECK OPTION constraint can be used in a view definition to restrict the columns displayed through the viewRows added through a view are deleted from the table automatically when the view is droppedThe OR REPLACE option is used to change the definition of an existing view without dropping and re-creating it.A subquery used in a complex view definition cannot contain group functions or joins4SQLWhich Statement best describes the GROUPING function?It is used to set the order for the groups to be used for calculating the grand totals and subtotalsIt is used to form various groups to calculate total and subtotals created using ROLLUP and CUBE operatorsIt is used to identify if the NULL values in an expression is a stored NULL values or created by ROLLUP or CUBEIt is used to specify the concatenated group expressions to be used for calculating the grand totals and subtotalsNone of the above3SQLWhich statement is true regarding operators used with subqueriesThe NOT IN operator is equivalent to IS NULLThe last_extraction_date'.Using mapping parameters and variable or type1 we can easily define from where parameter will start and how variable will change as deltas will get from OLTP systems

Can we use procedural logic inside Infromatica? If yes how, if now how can we use external procedural logic in Infromatica?We can use External Procedure Transformation to use external procedures. Both COM and Informatica Procedures are supported using External procedure Transformation

Can we override a native sql query within Informatica? Where do we do it? How do we do it?we can override a sql query in the sql override property of a source qualifier

How do we call shell scripts from informatica?You can use a Command task to call the shell scripts, in the following ways: 1. Standalone Command task. You can use a Command task anywhere in the workflow or worklet to run shell commands. 2. Pre- and post-session shell command. You can call a Command task as the pre- or post-session shell command for a Session task. For more information about specifying pre-session and post-session shell commands

There is a task named command task, using that you can write or call Shell script, DOS commands or BAT files

How do we extract SAP data Using Informatica? What is ABAP? What are IDOCS?To extract SAP DATA.Go to source analyzer, click on source, now u will get option 'Import from SAP'Click on this now give your SAP access user, client, password and filter criteria as table name (so it will take lesser time). After connecting, import the sap source.Now one important thing after finishing the map save it and generate ABAP Code for the map. Then only workflow will be running fine.

Where do we use semi and non-additive facts?Additive: A measure can participate arithmetic calculations using all or any dimensions.Ex: Sales profitSemi additive: A measure can participate arithmetic calculations using some dimensions.Ex: Sales amountNon-Additive measure cant participate arithmetic calculations using dimensions.Ex: temperature

What is Full load & Incremental or Refresh load?By Full Load or One-time load we mean that all the data in the Source table(s) should be processed. This contains historical data usually. Once the historical data is loaded we keep on doing incremental loads to process the data that came after one-time load.Full Load is the entire data dump load taking place the very first time. Gradually to synchronize the target data with source data, there are further 2 techniques:- Refresh load - Where the existing data is truncated and reloaded completely. Incremental - Where delta or difference between target and source data is dumped at regular intervals. Timestamp for previous delta load has to be maintained.Full Load: completely erasing the contents of one or more tables and reloading with fresh data. Incremental Load: applying ongoing changes to one or more tables based on a predefined schedule.