Oracle multi-Table query contact (Loger, log content, and log contact)

Source: Internet
Author: User


Oracle multi-Table query contact person (log person, log Content, log contact) Description: three tables are respectively www.2cto.com User table, aw_usercotrl log table, aw_userlog message table, and aw_userlog_lword User table. They are respectively the log table and the message table foreign key log table structure -- aw_usercotrl [SQL] SQL> desc aw_usercotrl; name Type Nullable Default Comments --------- ---------- -------- ------- -------- awuid number (10) AWUNAME VARCHAR2 (20) AWUPASSWD VARCHAR2 (20) awuhid number (10) y awuno number (10) -- aw_userlog [SQL] SQL> desc aw_userlog; Name Type Nullable Default Comments -------- ------------- -------- ------- -------- AULID NUMBER (10) AULHEAD VARCHAR2 (40) AULTEXT VARCHAR2 (200) aultdate date awuid number (10) Y -- alias www.2cto.com [SQL] SQL> desc tags; Name Type Nullable Default Comments -------- ---------------- ------- -------- AULID NUMBER (10) FKAULID NUMBER (10) y aulword VARCHAR2 (100) FK_AWUID NUMBER (10) Y table information [SQL] SQL> select * from aw_usercotrl; awuid awuname awupasswd awuhid awuno ----------- ---------------------- --------------- 1 Political Commissar 123 1 193094104 2 Obama 123 1 193094103 3 Bush 123 1 193094102 4 Saddam 123 1 193094101 SQL> select * from aw_userlog; aulid aulhead aultext aultdate awuid ------------------------------------------------ batch ----------- 1 oracle batch deletion and Restoration: if you do not write a stored procedure, drop can only generate one table at a time, 2012-8-22 1 1 2 java memory Analysis for java memory. This is a comparative research study of 2012-8-23 2 2 SQL> select * from aw_userlog_lword; www.2cto.com aulid fkaulid aulword FK_AWUID ------------- ----------- 1 this problem is well summarized. I have given a summary here, because the landlord has 2, 2, and 1 to grab a sofa. http://www.ticmy.com 3 4 2 it is really difficult to solve this problem. 4. Multi-Table query: the person who queries the departure log, the log sent, and the reviewer [SQL] SQL> select a1.awuname, B. aulhead, a2.awuname from aw_usercotrl a1, aw_usercotrl a2, aw_userlog B, aw_userlog_lword c where B. aulid = c. fkaulid and a1.awuid = B. awuid and a2.awuid = c. fk_awuid; awuname aulhead awuname -------------------- batch ------------------ batch Delete and restore the oracle batch Delete and restore George Bush Obama java memory analysis the principle of Saddam's query is used twice in one table, connect two and three tables, respectively, and connect two and three tables.
 

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.