where sal> any (select sal from emp where deptno = 30) -- Multi-column subquery select ename, sal, deptno, job from emp where (deptno, job) = (select deptno, job from emp where ename = 'Smith ') update empset sal = 1500, comm = 30 where ename = 'clark' select ename, sal, comm from emp where ename = 'clark' select ename, sal, comm, deptno from emp where (sal, nvl
Basic query:
View plain
-- Query Information of all employees
Select * from emp;
-- Set the row width
Set linesize 120;
-- Set the column width to the width of four digits
Col empno for 9999;
-- Set the column width. a indicates the string length of eight digits.
Col ename for a8
-- Set pageSize to display 30 records per page
Set pagesize 30;
-- SQL supports arithmetic expressions. Note: if an expression contains null values, the entire expression is empty.
Select empno, ename, sal, sal * 12,
connection in Java)7. select ename | 'afasjkj 'from emp; // string connection8. select distinct deptno from emp; // clear the repeated values of the deptno Field9. select distinct deptno, job from emp; // remove the values that are repeated with the two fields.10. select * from emp where deptno = 10; // (conditional filter query)11. select * from emp where empno> 10; // greater than the filtering Value12. select * from emp where empno 13. select * from emp where ename> 'CBA'; // string comparis
Plan. It takes seven days to evaluate the mission.Development. Demand AnalysisAs an event manager. I want to know the score of each team in order to generate rankings.. Generate Design Documents. Specific design. Specific code public static class SqlHelper {private static readonly string constr = "server=.; Database=itcast;integrated Security=true "; public static int ExecuteNonQuery (String sql, params sqlparameter[] pams) {using (SqlConnection conn = New SqlConnection (
gracefully. Indicates the end of the parallel code, ending other processes other than the main process.–? The serial code can still run on the main process (rank = 0), but no more MPI functions (including Mpi_init ()).3. int mpi_comm_size (Mpi_comm Comm, int* size)–? Gets the number of processes size.–? Specifies a communication child that also specifies a set of processes that share the space that comprise the group of the communication.–? Gets the
database statementSqlcommand comm = new sqlcommand (insertstr, Conn );Comm. Parameters. Add (New sqlparameter ("@ image_data", sqldbtype. Image); // Add a parameterComm. Parameters ["@ image_data"]. value = filebyte; // assign a value to the parameterComm. Parameters. Add (New sqlparameter ("@ image_content_type", sqldbtype. varchar, 50 ));Comm. Parameters ["@ i
Card detection CD and write protection WP
Sdks do not have uniform physical specifications for WP, CD, and comm.But for Pin 1 ~ 9 have unified specifications. pin sequence is 8, 7, 6, 5, 4, 3, 2, 1, 9
Card detection CD and write protection WP achieves mechanical connection between WP and CD to distinguish whether the card is inserted and whether there is write protection.Comm is the common pin of WP and CD, So If comm is connected to the location, W
. select * from emp where deptno = 10; // (conditional filter query)11. select * from emp where empno> 10; // greater than the filtering Value12. select * from emp where empno 13. select * from emp where ename> 'CBA'; // string comparison. In fact, the AscII value of each character is compared, which is the same as the string in Java.14. select ename, sal from emp where sal between 800 and 1500; // (between and filter, including 800 1500)15. select ename, sal,
Oracle condition selection statement and loop statement
Oracle Condition Selection statements (IF, CASE), LOOP statements (LOOP, WHILE, and FOR), and sequential control statements (GOTO, NULL ).1. IF condition selection statement1.1 simple condition judgment
DECLAREV_sal NUMBER (6, 2 );BEGINSELECT sal INTO v_sal FROM emp WHERE lower (ename) = lower (' name ');IF v_sal UPDATE emp SET sal = v_sal + 200 WHERE lower (ename) = lower (' name ');End if;END;
1.2 dual-condition Branch
DECLAREV_comm NUMBE
authorization
REVOKE permission 1,..., permission n ON database. * FROM username @ IP address;
Revokes the specified permissions of a specified user on a specified database.
Example: revoke create, ALTER, drop on mydb1. * FROM user1 @ localhost;
Revoke the create, alter, and drop permissions of user1 users on the mydb1 database.
4. View Permissions
Show grants for username @ IP Address
View permissions of a specified user
5. delete a user
Drop user us
dual;
-- General functions complete some functions-- Nvl function if the first parameter is null, the second parameter is used.Select comm from scott. emp;Select nvl (comm, 0) from scott. emp;
-- Replace null comm with 0 to calculate the annual income.Select ename, sal, comm, (sal +
),
@outcheck char (3) OUTPUT
as
if exists (SELECT * from UserInfo where fullname= @infullname and password= @inpassword)
Select @outcheck = ' Yes '
Else
Select @outcheck = ' No '
Note: Here is a stored procedure with three parameters, the first parameter @infullname, this is an input parameter, (user name), the second parameter @inpassword, is also an input parameter, (password), the third parameter @outcheck, this is an output parameter, (whether this user exists), the word "outp
if you consider the implementation of the efficiency of the need to seriously think about it. But honestly, it's
The function is still very powerful, there are a lot of very useful functions, use it's these functions, can be very convenient to achieve the function we want. So for those bosses who don't have special requirements,
Use it for protection
First, how to get ADODB? What is its operating environment?From the http://sourceforge.net/project/show ... 簆 hp4.0.5 above.Second, how to install
Tags: select employee function cot Replacement OAL default pre AMSThe COALESCE function returns the first non-null value from a list of values and replaces it with 0 when it encounters a null value. COALESCE (Str1,str2 ...); e.g. All employees who are lower than the ' WARD ' Commission (COMM) are required to be identified in the table, and the employee who made the null is included. (Personal opinion, if the default value of the Database Commission fi
function of the Decode function, with the following syntax:For example:2, grouping function (also multiprocessing line function)A multiline function is a multi-line input record that only outputs a single row of results, such as the average salary of all employees in the Employee Information table, or the payroll, and multiple rows of records (multiple employees) can only get one statistic result.(1) NULL is worth handlingAll grouping functions except count (*) ignore null values.The AVG (
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.