Common ASP database programming SQL skills
Common ASP database programming SQL skills
1. How to delete columns with repeated fields in a table? For example:
Table [table1]
Id name
1 aa
2 bb
3 cc
1 aa
2 bb
3 cc
I think the last table is like this.
Id name
1 aa
2 bb
3 cc
Answer:
Save the record to the temporary table #
implementing VS2010 Connection SQL Server 2008 operations and programming, the main record is a learning process. Implementing VS2010 Connectivity SQL Server: a column to tease and fly Implementing VS2010 Connection SQL Server 2008 code: Click the Open linkThree pointers to ADO:_CONNECTIONPTR: The connection used to e
Procedure and function programming procedure in PLSQL: Stored procedure eg: createorreplaceprocedurep -- here is the difference between iscurso and plsql
Procedure and function programming procedure in PL/SQL: Stored procedure eg: create or replace procedure p -- the difference between this and plsql is curso
Procedure and function
Tags: sql------------------------Inserting Data-------------------------80.1. Insert a full line--Each column must be populated in the order in which they appear in the table definitionINSERT into customersVALUES (' Pep E. Lapew ', ' Main Street ', ' LOS Angeles ', ' CA ', ' 90046 ', ' USA ', null,null)--INSERT Statement safe operation method, specify column, into keyword is optionalINSERT into customers(Cust_name,cust_address,cust_city,cust_state,cus
variable, And then print this variable */ V_sal: = 1000; Dbms_output.put_line (v_sal); END; 10.pl/sql Code Authoring Rules1) Benefits using appropriate writing rules can improve the readability of the code and reduce the difficulty of maintaining the program. 2) Rules A. Naming rules for identifiers a. V_ variable name define variable b. e_ variable name definition exception c ... B. The casing rule code is not case-sensitive, but it is recommended t
Pl/SQL programming data type in Oracle pl Programming Data Type: www.2cto.com 1. scalar type (scalar) 2. composite 3. reference Type 4.lob( large object) -------------------------------------------------------------- case 1 of defining a scalar. defines a variable-length string v_ename varchar2 (10) 2. define a decimal number ranging from-9999.99 to 9999.99 v_sal
One: SQL is also a programming language that you can use to programSecond: basic general programming elementsvariables, operators, expressions, process controls, functionsVariable:Typically, a field name is a variable name, and a field is a variable!Special variables, such as system built-in variables (character_set_xxx, autocommit)Typical operation of a variable
Java + theDbms_output.put_line ('Name:' ||V_name|| ', Salary:' ||V_sal|| ', Address:' ||v_addr); - End;Execution Result:5.2 Use of reference variablesReference variable: The type and length of the variable depends on the type and length of the field in the table (the type and length of the variable and the type and length of the field in the reference table), through the table name . Column Name %TYPE Specifies the type and length of the variable, for example v_name Emp.ename%typethe benefit of
Label:Original: SQL Server Programming Series (2): About operations for SMO common objectsIn the previous week, I briefly described some of the basic concepts of SMO, in fact, the SMO architecture is far more than the simple one described in the previous article, and is a complete structure shown on MSDN:
is a complete structural diagram that involves
ExceptionE.printstacktrace (); }at this point there will be a problem is to take JDBC to connect the time will be reported invalid Username/password; logon deniedbut you in the SQL developer landing time is not a problem, and finally found that because the user type, before the type of SYSDBA, and after using the JDBC connection is the default normal login so back to the problem of landing, Create a new normal user oralter user XXX identified by XXXd
PL/SQL (procedural language/sql) is a procedural programming language that Oracle introduces in the database.PL/SQL block structureDeclares part of the execution part (required) Exception handling section[DECLARE]--declaration section, optionalBEGIN-The execution part must be[Exception]--Exception handling section, opt
? T-SQL programming is accessible to most programmers and is a technology that must be mastered in database programming. Below, I am in the work or study accumulated some of the experience and skills. 1. extracts a substring of a string, based on the starting and ending strings, with the following code: 1) First, create a temporary table and write the d
Tags: style blog http io ar os sp for strongVS2013 MFC ODBC connection SQL Server database programming (ii)Reprint Please specify: http://blog.csdn.net/my_acm/article/category/2616577In the previous article, I explained how to connect to a SQL Server databaseRefer to Http://wenku.baidu.com/link?url=h1rGgnhSmnclH2lFexHmlP_SZ2LUDRy5xM4wrbTfYlRXZLj2o0ugMT_ below Pfg
条件
LOOP
语句序列;
END LOOP;
-----------------------------------------------
例如:
WHILE total .. .
total : = total + salary;
END LOOP; 格式二(主要使用这种,EXIT的地方容易理解):
Loop
EXIT [when 条件];
语句序列
Endloop format three: for I in 1 . .
3 loop statement sequence; end loop ; -- 打印1~10的数字
declare
1;
begin
loop
--循环
--退出条件
exitwhen10;
dbms_output.put_line(pnum);
-- 加1
1;
endloop;
end;The above is the basic syntax of PL/SQL
The ORACLE tutorial is: Oracle9iPL/SQL programming experience. I usually encounter some problems in PL/SQL programming. I will summarize them in the form of Q A for you to share.1. Can pipelines be used to improve processing efficiency when you need to load a large amount of data streams to a table or process a large
The ORACLE tutorial is: PL/SQL programming experience summary Developer Network Oracle. I usually encounter some problems in PL/SQL programming. I will summarize them in the form of Q A for you to share.1. Can pipelines be used to improve processing efficiency when you need to load a large amount of data streams to a
The ORACLE tutorial is: Oracle9iPL/SQL programming experience. I usually encounter some problems in PL/SQL programming. I will summarize them in the form of Q A for you to share.
1. Can pipelines be used to improve processing efficiency when you need to load a large amount of data streams to a table or process a larg
the main SELECT statement.
The ORDER BY clause can be used and is required for top-n analysis.
3. There are two comparison criteria that can be used in subqueries: Single-line operators and multi-line operators.
Single-line subqueries: Only one row of queries returned from the SELECT statement
Multiline subquery: Returning multiple rows of queries from a SELECT statement
A single-line subquery is a query that returns one row from an inner query. Use a single line operator in the subque
of data from a different table in a single query--2. Execute multiple queries against a single table, returning data as a single query--Find a list of all items with a price less than or equal to 5SELECT vend_id,prod_id, Prod_priceFrom ProductsWHERE Prod_price --Find a list of all items with a price less than or equal to 5, and also want to include all items produced by suppliers 1001 and 1002.SELECT vend_id, prod_id, Prod_priceFrom ProductsWHERE Prod_price UNIONSELECT vend_id, Prod_id,prod_pri
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.