Learn about oralce and what to write

Source: Internet
Author: User

Learn about oralce and what to write

1. query statement select * from TF_ B _TERM_PREPMG_LOG; select * from TD_M_TERM_PRICE; select * from TF_ B _CEN_TERM_MANAGER_LOG, Region; // query select * from region together with two tables; select * from TF_ B _CEN_TERM_MANAGER_LOG; select log_id * (1 + 0.1) newLog_id from TF_ B _CEN_TERM_MANAGER_LOG; // you can increase the log_id by 10% and use newlog_id to display select distinct log_id from TF_ B _CEN_TERM_MANAGER_LOG; // distinct: filter out data with the same keyword select * from TF_ B _CEN_TERM_MANAGER_LOG where log_id is null; // when the query condition is that a field is null, the statement select * from TF_ B _CEN_TERM_MANAGER_LOG where log_id is not null; select * from TF_ B _CEN_TERM_MANAGER_LOG where log_id> 300 order by log_id; // order by default, select * from TF_ B _CEN_TERM_MANAGER_LOG where log_id> 300 order by log_id desc; // order by is in ascending order by default. If you need to sort in descending order, add descselect * from TF_ B _CEN_TERM_MANAGER_LOG where log_id> 300 order by log_id, res_trade_id desc; // order by can be arranged with multiple parameters. The principle is to finish the first order and sort the second. // the commonly used function select count (*) from TF_ B _CEN_TERM_MANAGER_LOG; // count (*) select avg (log_id) from TF_ B _CEN_TERM_MANAGER_LOG; // average avg (keyword) select min (log_id) from TF_ B _CEN_TERM_MANAGER_LOG; // select max (log_id) from TF_ B _CEN_TERM_MANAGER_LOG; // select sum (log_id) from TF_ B _CEN_TERM_MANAGER_LOG; // calculate the records of a field in the table and select avg (log_id) from TF_ B _CEN_TERM_MANAGER_LOG group by log_id; // associate all records with the same logid, select avg (log_id) from TF_ B _CEN_TERM_MANAGER_LOG group by log_id having avg (log_id)>-1; // having statement is usually used together with group.

 


Related Article

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.