Oracle commonly used fool problem 1000 asked (three)

zhaozj2021-02-16  56

88. The anti-function of chr () is? ASCII () Select char (65) from Dual; select ASCII ('a') from Dual; 89. String SELECT Concat (Col1, Col2) from table; select col1 | COL2 from table; 90. How to guide the results from SELECT to a text file? SQL> Spool c: /abd.txt; sql> select * from table; sql> spool off; 91. How to estimate SQL execution I / O number? SQL> set autotrace on; SQL> Select * from table; or sql> Select * from V $ fileStat; you can view the number of IO 92. How to change the field size under SQLPLUS? ALTER TABLE TABLE_NAME MODIFY (Field_Name Varchar2 (100)); changing the row, the change is small (unless it is empty) 93. How to Query your data? Select * from table_name where trunc = to_date ('2003-05-02', 'YYYY-MM-DD'); 94. How is the SQL statement inserts a full date? create table BSYEAR (d date); insert into BSYEAR select to_date ( '20030101', 'yyyymmdd') rownum-1 from all_objects where rownum <= to_char (to_date ( '20031231', 'yyyymmdd'), 'ddd'); 95. If you modify the table name? ALTER TABLE OLD_TABLE_NAME RENAME TO NEW_TABLE_NAME; 96. How to get the return status value of the command? SQLCODE = 0 97. How do I know the permissions owned by the user? Select * from dba_sys_privs; 98. What is the difference between Oracle9i downloaded from the Internet? From the functional saying, Oracle has clearly defined; Oracle products downloaded from the website must not be used for commercial purposes, otherwise infringement. 99. How to determine that the database is running in archiving mode or running in non-invasive modes? Go to DBASTUDIO, History -> Database ---> Archive View. 100. SQL> Startup Pfile and IFILE, SPFILED What is the difference? Pfile is an Oracle traditional initialization parameter file, text format. IFILE is similar to include in C language, which is used to introduce another file into spfile. It is 9i added and is the default parameter file. After binary format startup, only PFILE 101 will be connected to the PFILE 101. How to search for the first N record? Select * from Employee WHERE ROWNUM CONN INTERNAL; SQL> Show parameter processes; 103. DB_BLOCK_SIZE can be modified? Generally, not, not recommended Do this.

104. How to count the total number of records of two tables? SELECT (SELECT Count (ID) from AA) Total from Dual; 105. How to use the SQL statement to find the n value in a column? Select * from (Select T. *, Dense_rank () over (Order By Sal) where rank = n; 106. How to add 2 years to existing dates? (SELECT add_months (sysdate, 24) from Dual; 107. What does it mean for negative? IT IS "HARMLESS". 108. What does Connect String refers to what? Should be the service name in tnsnames.ora 109. How to Expand the size of the Redo Log? Create a temporary Redolog group, then switch the log, delete the previous log, create a new log.

110. Is the TABLESPACE not greater than 4g? No limit. 111. Return to the minimum integer value equal to Is N? SELECT CEIL (N) from Dual; 112. Return to equal to N, minimum integer value? Select floor (n) from dual; 113 . Returns the last day of the current month? SELECT LAST_DAY (SYSDATE) from Dual; 114. How to Divas Data Imports Different User Data? IMP System / Manager File = aa.dmp fromuser = User_old Touser = USER_NEW ROWS = Y indexes = Y; 115. How to ? Get the name of the primary key field in the database table SQL> SELECT * FROM user_constraints WHERE cONSTRAINT_TYPE = 'P' and table_name = 'tABLE_NAME';? 116. plus two result sets mutual function SQL> SELECT * FROM BSEMPMS_OLD INTERSECT SELECT * FROM BSEMPMS_NEW ; SQL> SELECT * FROM BSEMPMS_OLD UNION SELECT * FROM BSEMPMS_NEW; SQL> SELECT * FROM BSEMPMS_OLD UNION ALL SELECT * FROM BSEMPMS_NEW; 117. Save two result sets mutual function SQL> SELECT * FROM BSEMPMS_OLD mINUS SELECT * FROM BSEMPMS_NEW;? 118 how to configure Sequence build sequence seq_custid create sequence seq_custid start 1 incrememt by 1; when built table:? create table cust {cust_id smallint not null, ...} when insert: insert into table cust values ​​(seq_cust.nextval, ... The commonly used part of the different parts of the date 119>. Writing of the time point: select to_char (sysdate, 'yyyy') from Dual 120>. Writing of the month of the time point: select to_char (sysdate, 'mm') from dual; 121>. Writing at the time of time point: select to_char (sysdate, 'dd') from dual; 122>. Writing at the time of time point: select to_char (sysdate, 'hh24') from dual; 123>. Writing method in time point: select to_char (sysdate, 'mi') from Dual; 124>. Take time point秒 的 的: select to_char (sysdate, 'ss') from dual; 125>. Date of Take the time point: Select Trunc (sysdate) from dual; 126>. Take the time of the time point: Select to_char (sysdate , 'Hh24: mi: ss') from dual; 127>. Date, time form becomes character form SELECT TO_CHAR (SYSDATE) from Dual; 128>. Convert cell string into a date or time form: SELECT TO_DATE (' 2003 / 08/01 ') from dual; 129>. Return to the parameters of the week of the week: select to_char (sysdate,'

转载请注明原文地址:https://www.9cbs.com/read-16498.html

New Post(0)