Notes for 1z0-007 Question Bank

Source: Internet
Author: User
Tags sql error

The instr function is a string function that returns the position of a string that appears for the first time in another string.

Instr Function Format: instr ([start,] string1, string2 [, compare])

Nvl2 (A, B, C). If a is not null, B is returned. If a is null, C is returned.

Trunc is actually a truncate function, which literally means truncation and truncation. The function truncates numbers.
For example, tranc (1234.5678, 2) returns 1234.5600. Tranc () is not rounded in. Another example:
The result of tranc (1234.5678, 0) is 1234.0000; the result of tranc (1234.5678,-2) is 1200.0000.

Select round (number, [decimal_places]) from dual
Decimal_places)
Select round (123.456) from dual; returns limit 123
Select round (123.456, 0) from dual; returns limit 123
Select round (123.456, 1) from dual; returns limit 123.5
Select round (123.456, 2) from dual; returns limit 123.46
Select round (123.456, 3) from dual; returns limit 123.456
Select round (-123.456, 2) from dual; returns round-123.46

Decode (condition, value 1, translation value 1, value 2, translation value 2,... value n, translation value n, default value)

The nullif () function returns a null value when expression1 is equal to expression2. If not, returns the value of expression1.

MoD (number1, number2) describes the division of two values and returns the remaining number.

Oracle Database has a function lpad (string a, int length, string addstring). 2: Add addstring to the left of A. length is the length of the returned value.
Rpad and lpad (paste character) rpad paste character on the right of the column. lpad paste character on the left of the column

Like % Represents 0 or multiple characters
_ Represents a character
Escape converter % ,_
Exp: job_id like '% sa \ _ %' escape '\';
Exp: job_id like '% Sa @ _ %' escape '@';

Multiple tables can be written in the form of select * From Table1 left join Table2 on condition 1 left join table3 on condition 2 left join table4 on Condition 3 where Condition 4.

Insert into (Select... from... where... with check option) values...
You can regard the subquery as a view or table, and insert into table_name (or subquery) values ();
1. For update, with check option is available. Make sure that the data is queried by the view after update.
2. For Delete, all with check options are the same
4. With check option for insert, make sure that data is queried by the view after insert.
For views without where clauses, using with check option is redundant.

You must use with check option to define the view. This option ensures the integrity of the data being modified in the database. If conditions are violated during the insert or update operation,
An SQL error is returned.

The interval data type is used to store the time interval between two timestamps.
Oracle supports two inteval types: year to month and day to second.

Rollback to savepoint
Commit

Using
It is used to input values to bind variables, for example:
For I2 in 1 .. 1000 Loop
Execute immediate 'select * From tablex where id =: 1 'using I2;
End loop;

Select E. last_name, D. department_name, D. location_id
From employees e join orders ments d -- On E. department_id = D. department_id
Using (department_id );

This statement is executed 1000 times. The query conditions are different each time, but the statement is run only once by parse.

Note the differences between fmdd and fmddspth.
Select to_char (sysdate, 'fmddspth "of" month yyyy am ') todays from dual;
Select to_char (sysdate, 'ddspth "of" month yyyy am ') todays from dual;

Select to_char (to_date ('19-Mar-2001 ', 'dd-MON-YYYY'), 'fmddspth "of" month yyyy fmhh: MI: SS am') new_date
From dual;
If you change Mar to March, no error will be reported.
Select to_char (to_date ('19-March-2001 ', 'dd-MON-YYYY'), 'fmddspth "of" month yyyy fmhh: MI: SS am') new_date
From dual;

Natural join in Oracle)
Although natural join (natural join) is actually rarely used, it is actually very useful. If it can be used frequently, it is actually very convenient.

A natural join is to search for fields with the same data type and column name in the two tables, then automatically connect them, and return all results that meet the condition.

Reference ['refr quota ns]
N. Reference, source, reference
Properties ..
1. Attributes

Even if there are no employees in the orders and even if the orders are not yet assigned to a location.
Even if there are no employees in charge of the department and even if the Department has not been assigned to a single location.

Regarding [ri 'G encoding: di encoding]
Prep. For more information

Ignore [ig 'n records:]
V. ignore or ignore
From: dict.cn

Aggregate ['invalid grigeit]
N. Total, total, aggregation
A. Total, set, aggregated
V. Aggregation, set, total

Parentheses
Parentheses

Exclude [iks 'klu: d]
V. excluded, excluded, rejected
[Computer] exclusion

Aggregate ['invalid grigeit]
N. Total, total, aggregation
A. Total, set, aggregated
V. Aggregation, set, total

Specified by specify

Nonequlijoin unbalanced Query

Manipulate [M comment 'nipjuleit] vt. Operations; manipulate; handle skillfully; tamper

What is true about joining tables through an equijoin?

A. You can join a maximum of two tables through an equijoin.
B. You can join a maximum of two columns through an equijoin.
C. you specify an equijoin condition in the select or from clauses of a SELECT statement.
D. To join two tables through an equijoin, the columns in the join condition must be primary key and foreign
Key columns.
E. You can join n tables (all having single column primary keys) in a SQL statement by specifying a minimum
Of N-1 join conditions.

Which of the following statements about equijoin is true?
A You can only perform equivalent join operations on two tables at most.
B equijoin can only connect two fields
C. You can perform equijoin in select or from statements.
D. Only the primary key or foreign key can be used for equivalent join conditions
E. Connect n tables with at least N-1 join conditions (all tables have only one primary key column)

There is no doubt that only E is correct.

Domain names of large well-known websites are held
Since CNNIC has checked the domain name for record filing, it first prohibits the individual registration of the CN domain name, and then introduces regulations that will not be resolved for non-filed domain names in the future. In less than a month, 0.1 million of personal websites were shut down. However, it was the first time that the enterprise site was shut down, especially it168. domain name resolution was stopped on IT technology information websites.

Even it168 and 51.com liba.com have not escaped the big rectification of the Internet, not to mention the weak grass-roots webmasters.

Pay attention to the review of the website content. If you are not at ease, the international domain name's Webmaster can be transferred abroad. The Chinese domain name's Webmaster can promptly transform the international domain name and protect its own website to survive the storm. After shuffling, the network environment will become more mature and stable, and new opportunities will emerge. Do not be discouraged and stick to it.

I spent the whole day working on my website to steal and fry corn.

No one knows how hard I am. Google doesn't know either. I don't want to be a real estate developer. who invested in me !!

13817807591 -- video phone Testing

15921669402

T-network GPRS traffic (byte) 0 10485760
T local network duration (including visible) (minutes) 11 39
Local duration (minutes) 91 409

Mobile Data Traffic (Kb) 2028 28692

Audio ['audio: di u] adj. Audio; audio, audio frequency

Nested ['nestid]
Nested

Violate ['vai ə Leit] vt. violation; violation, obstruction; Violation

Existing [ig 'zisti finished]
[Computer] existing

Effects [I 'fekts]
N. pl. Result, effect, Function

Degradation [, degr comment 'dei limit N]
N. Lower, fall, and degrade

Consume [k then n' sju: m]
Vt. Consumption, consumption; make... Fans; squandering
Vi. depletion, destruction; depletion of life

Recommendations
N. Recommendation

Statistics [st comment 'tistiks] n. Statistics; statistics; Statistics

Restructuring
Structure Conversion
Reorganization

Retention [ri 'Ten minutes before N] Save
Retained adj. Reserved
V. retention; retention

Guaranteed [, G Branch R limit n' Ti: d]
A. If there is a guarantee, someone will guarantee it.

Be available; available

Scenario [Si 'n records: RI ə U,-'n' records-,-'n' ε records-] n. plot; script; Solution

Accomplish [merge 'K into mpli merge, merge 'K into M-] vt. Complete; implement; achieve

Performance [p comment 'f comment: m comment ns]
N. Performance
N. Performance
Perform [p comment 'f comment: m]
V. Execute, perform, and do
Dynamically
Adv. Dynamic; changing; Dynamic

At regular intervals (distance)

Looking back at the course of learning English, I did not remember a word every day. So we should keep repeating. Learn to calculate one.

Q: 10 click the exhibit button and examine the data from the EMP table.
The Commission column shows the monthly Commission earned by the employee.
Which three tasks wocould require subqueries or joins in order to be placed med in a single step? (Choose
Three .)
Click the execute button to query the records of the EMP table.
The Commission column displays the employee's monthly commission.
Select the three items that require subquery or connection query to complete independent operations.
The following describes the options.
A. Deleting the records of employees who do not earn commission
B. Increasing the commission of employee 3 by the average commission earned in department 20
C. Finding the number of employees who do not earn commission and are working for department 20
D. inserting into the table a new employee 10 who works for department 20 and earns a Commission that is
Equal to the Commission earned by employee 3
E. Creating a table called Commission that has the same structure and data as the columns emp_id and
Commission of the EMP table
F. Decreasing the Commission by 150 for the employees who are working in department 30 and earning
Commission of more than 800
A deletes employee information with blank Commission. Therefore, this parameter is not selected.
B. Increase the commission of employee 3. Refer to the average salary of Department 20. So here we will use a subquery to find the average salary of Department 20.
C. Find the employees who work for the department 20 and leave the Commission blank.
D. Add a record with employee Employee ID 10 and department ID 20. If the employee's Commission is equal to employee 3, use the subquery to select
E. Create a table Commission. Is the emp_id and Commission structures of the table and EMP table consistent with the data type? subquery is also required.
F. Reduce the number of employees who work for the Department by 30 and the commission of employees who have over 800 is 0.15. No subquery is required.

Answer: B, d, e

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.