Sie sind auf Seite 1von 4

Sr no 1 2

3 4 5

7 8

10 11 12

13 14 15

16

17 18

19 20

21

Important facts Minus is like minus in math.. Intersect gets you all the rows which are common in to_date and to_char you need to specify the mask For Sequence : 1. CURRVAL is used to refer to the last sequence number that has been generated 2.When the MAXVALUE limit for a sequence for reached, you can increase the MAXVALUE limit by using the ALTER SEQUENCE statement 3.When a database instance shuts down abnormally, the sequence numbers that have been cached but not used would be NOT BE available once again when the database instance is restarted The numbers generated by a sequence can be used for all the tables 5.DELETE <sequencename> would NOT remove a sequence from the database After commit, all savepoints In between are removed. So no affect of rollback to savepoint. If rollback Statements that cause transactions to end: DDL & DCL like : Create, Commit, Rollback, Truncate Interval '300' month : will divide 300/12 and give answer +month-days, Interval '54-2' year to month is 54 yrs and 2 months and gives ans in +year-month.. So interval '11' y Interval '' hour to second gives time in HH:MM:SS:Fractional seconds upto 6 places Subqueries: Subqueries can contain GROUP BY and ORDER BY clauses Main query and subquery can get data from different tables Multiple columns or expressions can be compared between the main query and subquery Subqueries can be used in "Field names, from clause, where clause in select n all dml and having clau Null comes with IS operator and not = Dates: The default internal storage of dates is in the numeric format The RR date format automatically calculates the century from the SYSDATE function but allows the user to enter the century if required Views: View can include group by View with distinct, group by and aggregate functions cannot be handled byDML A view that is created with the subquery having the pseudo column ROWNUM keyword cannot be updated A Data Manipulation Language (DML) operation can be performed on a view that is created with the subquery having all the NOT NULL columns of a table In Order by , nulls are last in asc order or you may specify Nulls Last/ First as per your need you can order by expressiob like order by a*.25 desc even If this column is not present in select query nullif(a,b) = null id a=b or if a is null Constraints :SYSDATE cannot be used with CHECK Constraint Foreign key can hv null values UNIQUE can have null A constraint can be disabled even if the constraint column contains data Primary key can be added if data exists provided all are unique and not null SET Operators: It produces an error because the ORDER BY clause should appear only at the end of a compound query-that is, with the last SELECT statement check question 31, 38 , 41 , 48 , 54 , 58 , 61 , 76 Index: When a table is dropped, the corresponding indexes are automatically dropped A nondeferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates a unique index For each data manipulation language operation performed, the corresponding indexes are automatically updated Data types:Only One LONG column can be used per table Long cannot be used in order by clause The minimum column width that can be specified for a VARCHAR2 data type column is one The value for a CHAR data type column is blanked-padded to the maximum defined column width COALASCE:It requires that all expressions in the list must be of the same data type

UNION:NULL values are not ignored during duplicate checking Average cannot opearate on non numeric data types Count func: COUNT(*) returns the number of rows including duplicate rows and rows containing NULL value in any of the columns COUNT(DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULL values in the INV_AMT column

Das könnte Ihnen auch gefallen