1. Without GUI1.1 diff
Diff can compare two foldersSyntax: diff [Option] file1 file2 Description: This Command tells you which lines of file1 and file2 need to be modified to make the two files consistent. If "-" is used to represent file1 or fiie2, it indicates the standard input. If file1 or file2 is a directory, diff compares the files with the same name in the directory. Example: diff/usr/xu mine
The options are as follows:
-B ignores the spaces at the end of the line, and one or more space
Makefile and makefile are equivalent.
$ MV makefile
$ Make
Gcc-C main. c
Gcc-C Liu. c
Gcc-C generatedatafile. c
Gcc-G main. O Liu. O generatedatafile. O-o Liu
-L/usr/local/MySQL/lib/MySQL-lmysqlclient-LZ
Rm-f *. o
Makefile format
Depend
MAKEFILE file format -------- use the section (rule) as the basic structure
$ Cat makefileLibs =-L/usr/local/MySQL/lib/MySQL-lmysqlclient-LZALL: LiuCleanTwo sections of all dependLiu: Main. O Liu. oGeneratedatafile. oLiu dependGcc-G $? -
query Syntax:Select *| column name from table name where condition;9. Comparison operators> Greater than= equals>= greater than or equal to! = or 10.IS null and is NOT NULLFind employees who can get a monthly bonusSelect Empno,ename,comm from EMP where comm are NOT null;Inquire about employees without bonusesSelect Empno,ename,comm from emp where
Select Basic Query statementBasic query statements using tables from the Scott user in OracleSELECT * from EMP;--The number of the employee who listed the position as manager, name--Select Empno,ename from emp where job = ' MANAGER ';--like Fuzzy Query I don't know, either.SELECT * from EMP WHERE ename like '%*_% ' ESCAPE ' * ';--Finding employees with bonuses above their salariesSELECT * FROM EMP where comm>sal;--Find out the sum of each employee's s
minimum value from EMP;(3) To find out the total number of employeesSelect COUNT (*) as total number from EMP;(4) Query department number (remove duplicates)Select COUNT (Distinct DEPTNO) as sector number from EMP;(5) Row to columnSet line widthSet Linesize 200Name of employee in Col Department for A60Select Deptno as department number, the name of the employee in the Wm_concat (ename) as department from the EMP Group by DEPTNO;(6) Grouping function and null valueA, the average salary of the st
Tags: performance comm foreground position stage merge type Insert GlobalIndex, index creation, modification, deletion2007-10-05 13:29 Source: User reviews 0 Views 2986IndexAn index is an object in a relational database that is used to hold each record, and the main purpose is to speed up the reading speed and integrity checks of the data. Indexing is a highly technical and demanding task. Generally in the database design phase with the database struc
Routine collection of commonly used SQL query statements and SQL statements
Common SQL query statements are as follows:
1. Simple query statements
1. view the table structure
SQL> DESC emp;
2. query all columns
SQL> SELECT * FROM emp;
3. query specified Columns
SQL> SELECT empmo, ename, mgr FROM emp;
SQL> SELECT DISTINCT mgr FROM emp; only items with different results are displayed
4. query the specified row
SQL> SELECT * FROM emp WHERE job = 'cler ';
5. Use arithmetic expressions
SQL> SELECT en
name), MIN (column name)
5.2 NVL (exp1, exp2)
If exp1 is NULL, exp2 is used. Same as isNull () in SQL Server.
Example: Calculate the income of each person in the emp table (salary + bonus)
SELECT sal + NVL (comm, 0) FROM emp;
Note:
SELECT t. *, rownum from emp t order by sal + NVL (comm, 0 );
Use the ROWNUM semicolon before sorting. The result will cause ROWNUM confusion.
5.3 NVL (exp1, exp2, exp3)
If exp1
1. Call the stored procedure without input/output parameters
Create procedure testproc
As
Select pub_id, title_id, price, pubdate
From titles
Where price is not null
Order by pub_id
Use the following program to call this stored procedure. When calling this stored procedure, you must tell the command object that you want to call the stored procedure.
Sqlconnection conn;Protected void page_load (Object sender, eventargs E){Conn = new sqlconnection ("Server = localhost; database = pubs; uid = sa;
The common SQL query statement looks like this:
First, simple query statement
1. View table structure
SQL>DESC EMP;
2. Query all Columns
Sql>select * from EMP;
3. Query specified column
Sql>select empmo, ename, Mgr from EMP;
Sql>select DISTINCT Mgr from EMP; Show only items with different results
4. Query specified line
Sql>select * from emp WHERE job= ' clerk ';
5. Using an arithmetic expression
Sql>select ename, SAL*13+NVL (comm,0) from
) Statement: Our four-day time, mainly in the work of "Java EE Engineer" angle, the operation of the database "common" function
-The following code is to display the EMP table to do the setting
col empno for 9999;
Col ename for A10;
Col job for A10;
Col Mgr for 9999;
Col hiredate for A12;
Col Sal for 9999;
Col Comm for 9999;
Col Deptno for;
Set pagesize;
Col tname for A20;
Set pagesize;
--Create a new table new_emp, copy the structure and data fr
First, simple query statements 1. View table structure SQL>DESC EMP; 2. Querying all Columns Sql>select * from EMP; 3. Querying a specified column Sql>select empmo, ename, Mgr from EMP; Sql>select DISTINCT Mgr from EMP; Show only items with different results 4. Querying a specified row Sql>select * from emp WHERE job= ' clerk '; 5. Using an arithmetic expression Sql>select ename, SAL*13+NVL (comm,0) from EMP; NVL (
function, a C call, and so on. It is worth noting that the general user to create the function index, must have the global QUERY rewrite and create any index permission. Otherwise, you cannot create a function index, see the following example:Example 1: Index of the uppercase conversion function for the ename column of the EMP table idx:CREATE INDEX idx on EMP (UPPER (ename));This allows you to use the following query statements:SELECT * from EMP WHERE UPPER (ename) like ' joh% '; Example 2: In
. These expressions can be an arithmetic expression, an SQL or a/PL function, a C call, and so on. It is worth noting that the general user to create the function index, must have the global QUERY rewrite and create any index permission. Otherwise, you cannot create a function index, see the following example:Example 1: Index of the uppercase conversion function for the ename column of the EMP table idx:CREATE INDEX idx on EMP (UPPER (ename));This allows you to use the following query statements
is, only two strings, three strings concatenated, two concat are required.Demo: Listed in "Name: Salary" form
SELECT CONCAT (CONCAT (ename, ': '), Sal) from EMP;
L | | Connection symbols, you can concatenate multiple stringsDemo: Listed in the form "Name: Performance: Salary"
SELECT ename| | ': ' | | comm| | ': ' | | Sal from EMP;
Demo: List The above information in an alias-empinfo manner
Tags: run select int Manage select to implement ARC Update 5.61. View table structure SQL>DESC EMP; 2. Querying all Columns Sql>select * from EMP; 3. Querying a specified column Sql>select empmo, ename, Mgr from EMP; Sql>select DISTINCT Mgr from EMP; Show only items with different results 4. Querying a specified row Sql>select * from emp WHERE job= ' clerk '; 5. Using an arithmetic expression Sql>select ename, SAL*13+NVL (comm,0) from EMP; NVL (
First, simple query statements1. View table structureSQL>DESC EMP;2. Querying all ColumnsSql>select * from EMP;3. Querying a specified columnSql>select empmo, ename, Mgr from EMP;Sql>select DISTINCT Mgr from EMP; Show only items with different results4. Querying a specified rowSql>select * from emp WHERE job= ' clerk ';5. Using an arithmetic expressionSql>select ename, SAL*13+NVL (comm,0) from EMP;NVL (comm
Tags: symbol int same like an arc rom false divFirst, simple query statements 1. View table structure SQL>DESC EMP; 2. Querying all Columns Sql>select * from EMP; 3. Querying a specified column Sql>select empmo, ename, Mgr from EMP; Sql>select DISTINCT Mgr from EMP; Show only items with different results 4. Querying a specified row Sql>select * from emp WHERE job= ' clerk '; 5. Using an arithmetic expression Sql>select ename, SAL*13+NVL (comm,0) from
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.