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
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
, with a condition of comm equals 0SELECT * from scott.emp WHERE comm = 0;--Query all columns of the EMP table for the Scott user, conditional comm equals an empty stringSELECT * from scott.emp WHERE comm = ';--Query all columns of the EMP table of the Scott user, conditional comm
Well, I just tried several ways to insert data into the database and record it:
Here, the ASPX page has two textbox controls named username and PWD respectively. There is also a submit button, the following
Code Are written in the time of the button: (as follows)
1. Use sqlcommand to directly write an SQL statement: String strusername
=
This
. Username. text;String strpwd
=
This
. Pwd. text;
Sqlconnection Conn
=
New
Sqlconnection ();Sqlcommand
the rebate network. (This step must be completed after the order number is generated. It cannot be placed after payment)
Call format: Use get as an example:Http://data.51fanli.com/union/fanliorder.asp? Otime = 2009-9-1 o_cd = 10005276 m_id = m_id K = 123456 u_id = 6 p_cd = 21312 | _ | c_cd = A | _ | it_cnt = 1 | _ | Price = 160 | _ | comm = 22 | _ |
Place this code segment on the order generation success page. After the order is generated, c
can complete the load/store operations on them in a command:
Lw $2, addr ------ à lw $2, addr-_ gp ()
One problem is that when compiling modules that are independent from each other, compiler and aggreger determine which variables need to be addressed through gp. The common practice is to keep all variables smaller than a specific length (usually 8 bytes) objects are placed in this range, which can be controlled by the "-G n" option of compiler/assembler. in particular, "-G 0" will cancel the g
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.