The problem is to build a very early database in the time of the encounter, although this problem has a lot of relevant posts on the Internet, but because recently encountered many such questions, hereby simply record:1. The first problem
--oracle querying the current versionSELECT * from V$version;----------Oracle Query server-side encoding----------SELECT * from v$nls_parameters where parameter= ' nls_characterset ';----------Three ways Oracle queries the current
What is a view? )1. A view is a database object, a virtual table that is exported from one or more data tables or views, and the data corresponding to the view is not really stored in the view, but is stored in the referenced data table, and the
GROUP BY group--Number of jobs per job from the EMP group by job;--How much work select COUNT (coutn) from the EMP group by job;--the maximum wage for each job select M Ax (SAL) from EMP Group by job;--minimum wage per work Select min (sal) from EMP
Example 1: finding duplicate data in a table, repeating records are judged by a single field (Id), and the table is named student SELECT Id COUNT(1) from STUDENT T GROUP by having COUNT > 1Example 2: Delete redundant
Stored procedure (stored procedure): can be regarded as the name of the PL/SQL program block, by name call execution; can take parameters or without parameters.Trigger (Trigger): Event-triggered execution, which can be considered a special type of
Two methods of randomly fetching a record in OracleV_count int:=0;V_num INT: = 0;A continuous and unique column FID in the 1:tbl_mytable tableBEGINSELECT COUNT (*)Into V_countFrom Tbl_mytable;SELECT TRUNC (dbms_radom. VALUE (1,v_count+1)) into V_num
First, Dbms_jobs1, check the running job;SELECT * from User_scheduler_running_jobs2, according to Sid isolated the corresponding session;Select sid,serial# from v$session where sid= ' session_id ';3, kill the corresponding session;Alter system kill
#切换到Oracle用户Su-oracle#登录sqlplusSqlplus/as SYSDBA#设置显示格式Set pagesize 300;Set Linesize 300;#查询用户列表及用户状态Select Username,password,account_status from Dba_users;#查看用户分配的权限SELECT * from Dba_role_privs order by GRANTEE;SELECT * from dba_role_privs where
In Java, change the time of the string type to the date type and then perform the operation:Date time1 = new SimpleDateFormat ("Yyyy-mm-dd HH:mm:ss"). Parse (Intime);Time2.gettime () converts to a long type of this time, which realizes the judgment
Sets the method for archiving.1 sql> archive log list; #查看是不是归档方式2 sql> alter system set LOG_ARCHIVE_START=TRUE Scope=spfile; #启用主动归档Sql> alter system set log_archive_dest= "Location=/oracle/ora9/oradata/arch" scope=spfile;#设置归档路径Sql> alter system
Packages are used to logically combine procedures and functions, which consist of package specifications and package bodies.1), we can use the Create Package command for creating packages such as:I, create a package sp_packageII. Declare that the
First, IntroductionThis section focuses on how to manage permissions and roles in Oracle, and what the difference between permissions and roles is.When a user is just established, the user does not have any permissions and cannot perform any action.
First, IntroductionA role is a collection of commands related to permissions, and the primary purpose of using roles is to simplify the management of permissions.Assume that there are user a,b,c in order for them to have the following permissions1.
1. RDBA (tablespace relative database block address)is the relative data block address, is the address of the data, RDBA can be rowid in rfile#+block#.Get file# and block# based on RDBA, using 10 binary RDBASELECT
Years:YY: two-year 16YYY: three-year 016YYYY: four-year 2016QuarterQ: Return to QuarterMonthMm:MON:MONTH:WeekWw:W:DaysDd:Ddd:Dy:Day:HoursHH:HH24:Score ofMI:SecondsSs:1. Get the current system date-- returns the current system date SELECT from DUAL;2
1.9i Oracle Official Document Online viewHttp://www.oracle.com/pls/db92/homepage2.10g Oracle Official Document Line viewHttp://www.oracle.com/pls/db102/homepage3.11GR1 Oracle Official Document Line viewHttp://www.oracle.com/pls/db111/homepage4.11GR2
Both object_id and data_object_id are unique identities of objects.OBJECT_ID is the logical identity of an objectDATA_OBJECT_ID is the physical identity of the objectFor objects that do not have physical storage, data_object_id is empty. For example:
1. Description:Here is a hypothetical application scenario!Suppose that there is a large amount of data in the banking system that needs to be backed up in time, how quickly and efficiently!Condition Requirements:(1), can not set the Sync lock (set
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