Oracle analysis function PERCENTILE_CONT
Query the salaries of people with the salary distribution of 25%, 50%, and 75% in each department. percent_rank () is the relative position in the ranking.
Create table EMP(Empno number (4) not null,ENAME VARCHAR2 (10 ),JOB VARCHAR2 (9 ),Mgr number (4 ),Hiredate date,Sal number (7,2 ),Comm number (7, 2 ),Deptno number (2));Insert into emp (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL,
implementation of specific database operationsIn order to implement the operation of the database, we need to define the subclass of the Dboperator class, we take sqldboperator as an example, obviously sqldboperator implement the operation of the SQL Server database.
First, you define a Sqldboperator class that inherits from Dboperator and imports the namespace system. Data. SqlClient.Using System.Data.SqlClient;Class Sqldboperator:dboperator
Second, add private data members Conn,trans,intransa
Tags: des style io ar sp for on Art BSCheck the salary of each department in 25%, 50%, 75% position,Percent_rank () is the relative position in the ranking .CREATE TABLE EMP(EMPNO Number (4) is not NULL,Ename VARCHAR2 (10),JOB VARCHAR2 (9),MGR Number (4),HireDate DATE,SAL number (7,2),COMM number (7,2),DEPTNO Number (2));INSERT INTO EMP (EMPNO, ename, JOB, MGR, HireDate, SAL, COMM, DEPTNO)VALUES (7369, ' SM
, database import and export, etc.
Date type
Overview: In a computer operating system or in a variety of advanced programming languages, dates are usually saved in a long integer, usually in milliseconds
Oracle internally stores date and time information in digital format: century, year, month, day, hour, minute, second
The default date format is Dd-mon-yy. You can use the SysData function to get the current system date and time
Operation: Date-type data can be directly added or minus a val
Using System;
Using System.Collections.Generic;
Using System.Text;
Using System.Data.SqlClient;
Using System.Collections;
Using System.Data;
Summary: Data access Assistant.
Author: Zhiqiao
Date: 2008/07/02
Namespace Zhiqiao.dataaccesshelper
{
The stored procedure call assistant.
public class Storeprocedure
{
The name of the stored procedure.
private string _name;
The database connection string.
private string _constr;
Constructors
sProcName: Stored procedure name;
Constr: Database connection
/xquery/xquery_intro.aspThe XQuery concept is understood to require further understanding of SQL Server support functions for XML, mainly query (), nodes (), exist (), value (), modify (), as detailed in http://msdn.microsoft.com/ Zh-cn/library/ms190798.aspxThere are two ways to implement where in with XML, using value and exist, where the exist method is recommended, as MSDN describes:D. Using the exist () method without using the value () methodvalue() method in a predicate to compare with a r
enter the namespace inside to see:# IP netns exec qrouter-fce64ebe-47f0-4846-b3af-9cf764f1ff11 IP addr1:lo: MTU 65536 qdisc noqueue State UNKNOWN L Ink/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00 inet 127.0.0.1/8 Scope host lo INET6:: 1/128 Scope Host Valid_lft Forever preferred_lft forever20:qr-0b7b0b40-f9: MTU qdisc noqueue State UNKNOWN Link/ether FA:16:3E:82:47:A6 BRD ff:ff:ff:ff:ff:ff inet 10.10.10.1/24 BRD 10.10.10.255 scope global QR-0B7B0B40-F9 Inet6 FE80:
1. select * from emp;
2. select empno, ename, job from emp;
3. select empno number, ename name, job from emp;
4. select job from emp;
5. select distinct job from emp;
6. select distinct empno, job from emp;Note: Because employee numbers are not repeated, it is proved that all columns are not repeated at this time, so repeated Columns cannot be eliminated.
7. query the employee ID, name, and work, but the displayed format is: 7369 employee, name: smith, and work: clearSelect ':' | empno | 'employ
I believe that the 99 SQL statements are handled, and the basic Oracle test is just like playing (the most comprehensive and most typical entry-level Oracle query statements in history)
1. select * from emp;2. select empno, ename, job from emp;3. select empno number, ename name, job from emp;4. select job from emp;5. select distinct job from emp;6. select distinct empno, job from emp;Note: Because employee numbers are not repeated, it is proved that all columns are not repeated at this time, so
= "select * from tree where uid> @ myid ";Sqlcommand comm = new sqlcommand (SQL, Conn );// Use the add method of the parameters attribute of Comm to define and assign values to the above @ myid Parameter// The sqldbtype class provides the same database type as the sqlserver Data TypeSqlparameter sp = comm. Parameters. Add ("@ myid", sqldbtype. INT );Sp. value =
Windows, you can use WinRAR to import it.
Extract the Directory and copy it to the ADODB directory of the specified directory. For example, I copied it to/comm/ADODB/In the example.3. How to call ADODB?Use include_once ("./comm/ADODB. Inc. php"); isn't that necessary? The main file that contains ADODB.4. How to Use ADODB?1. Perform initialization:ADODB uses a statement such as $ conn = adonewconnection ()
.
Because the annotation writing is more detailed, the following program usually only posts the code.
There are two member variables. One is the SerialPort class provided by C #, which is the ing of physical serial ports in the program.
The other is a variable string type stringbuilder used for string processing.
// Serial private SerialPort comm = new SerialPort (); // variable string class, used to store the received characters private stringbuil
Windows you can use WinRAR to its
Row decompression, after the decompression is completed, copy the directory to the ADODB directory of the specified directory, as I copied it into the/comm/adodb/in the example.
Third, how to invoke ADODB?
Use Include_once ("./comm/adodb/adodb.inc.php"); is that a good line? Contains the ADODB Master file.
Iv. How to use ADODB?
1. To initialize:
ADODB uses $conn = Adonewc
Windows you can use WinRAR to its
Row decompression, after the decompression is completed, copy the directory to the ADODB directory of the specified directory, as I copied it into the/comm/adodb/in the example.
Third, how to invoke ADODB?
Use Include_once ("./comm/adodb/adodb.inc.php"); is that a good line? Contains the ADODB Master file.
Iv. How to use ADODB?
1. To initialize:
ADODB uses $conn = Adonewc
believe that the 99 SQL, Oracle Basic written test is just like playing (the most complete, the most classic entry-level Oracle query statement)1. Select * from EMP;2. Select Empno, ename, job from EMP;3. Select empno number, ename name, job work from EMP;4. Select Job from EMP;5. Select distinct job from EMP;6. Select distinct empno, job from EMP;Description: Because the employee number is not duplicated, it proves that all columns are not duplicated at this time, so duplicate columns cannot be
In the previous query, the result is all records in the table. If you want to only display records that meet certain conditions, you must use conditional query or a restricted query.
Basic Syntax of conditional query:
SELECT * | (specific column names, such as ename and empno)
FROM table (table name)
WHERE conditions
Note: The where clause must be followed by the from clause.
For example, query all information of employees whose salaries are greater than 2000 in the emp table.
SQL> select
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.