The so-called data movement in DB2 includes:1. Import Data)2. Data Export (Export)3. Load)
Both import and load use DB2 commands to save data in files of a certain format to tables in the database.Export refers to saving the data in the table of the DB2 database to a file of a certain format.
The role of data movement:
To transfer data between different database management systems, data movement is usually the most practical method, because any database management system supports common file for
len (username) from admin) >5//Return error and
(select top 1 len (username) from Admi N) =5//return correct, stating that the word length of username is five, most likely the decision of the admin
password field: And
(select top 1 len (password) from admin) >16/ /Return error
and (select top 1 len (password) from admin) =16//return correct, stating that the password word length is 16 bits, most likely MD5 encrypted. 00x4 [Guess the Administrator account]//use ASCII conversion to get encrypte
The so-called data movement in DB2, including:1. Importing data (Import)2. Exporting the data (export)3. Loading of data (load)Both import and load are used to save data from a file in a format to a table in a database using DB2 's related commandsExporting refers to saving data from tables in a DB2 database to a file in a certain format.The role of data movement:If you want to transfer data between different database management systems, data movement is often the most practical method, because
Copy codeThe Code is as follows:Declare @ TotalCount intDeclare @ TotalPageCount intExec P_viewPage_A 'type1', '*', 'id', ', 'Id asc', @ TotalCount output, @ TotalPageCount outputSelect * from type1Create PROC P_viewPage_A/*Nzperfect [no_mIss] efficient and common paging Stored Procedure (bidirectional retrieval) 2007.5.7 QQ: 34813284Tip: Applicable to tables or views with a single primary key or a unique value columnPs: the SQL statement is 8000 byte
page, and an error (greater than 6 and less than or equal to 7) is returned when you guessed 7, the column length is 7. Because "top 1" means to extract the first record, it should be used if you want to guess the second record:
Select top 1 len (column name) from Table Name
Where column name not in (select top 1 column name from table name)
2. ASCII code analysis method to guess the user and password
ASC () and Mid Functions
Example: mid (column n
into TB values ('zhang san', 93)
Insert into TB values ('Lee 4', 94)
Go
-- SQL Server 2000 static SQL.
Select * from
(
Select name, course = 'China', score = Chinese from TB
Union all
Select name, course = 'mat', score = mathematics from TB
Union all
Select name, course = 'physical ', score = physical from TB
) T
Order by name, Case course when 'China' then 1 when' math 'then 2 when' then 3 end
-- SQL Server 2000 dynamic SQL.
-- Call the dynamic ecosystem of the syste
into TB values ('zhang san', 93)
Insert into TB values ('Lee 4', 94)
Go
-- SQL Server 2000 static SQL.
Select * from
(
Select name, course = 'China', score = Chinese from TB
Union all
Select name, course = 'mat', score = mathematics from TB
Union all
Select name, course = 'physical ', score = physical from TB
) T
Order by name, Case course when 'China' then 1 when' math 'then 2 when' then 3 end
-- SQL Server 2000 dynamic SQL.
-- Call the dynamic ecosystem of the syste
How to sort JavaScript Object arrays by specified attributes and sorting directions? javascript Array
Introduction
In a data-centric Information System, it is common to present data in the form of tables. Sorting data is essential. Sorting can be divided into sorting by a single field and sorting by multiple fields in different sorting directions. Single-field sorting has many limitations and cannot meet users' requirements for changing data concerns. Multi-field sorting can make up for this def
SQL-92 syntax. Use left Outer Join Assume that the authors table and the publishers table are joined in the city column. The results only show the author of the publisher's city (Abraham Bennet and Cheryl Carson in this example ). To include all authors in the results, regardless of whether the publisher lives in the same city, use the SQL-92 to connect left out. The following are the query results of the left Outer Join of transact-SQL: Use pubs Select a. au_fname, A. au_lname, P. pub_nam
the SQL-92 syntax.
Use left Outer JoinAssume that the authors table and the publishers table are joined in the city column. The results only show the author of the publisher's city (Abraham Bennet and Cheryl Carson in this example ).
To include all authors in the results, regardless of whether the publisher lives in the same city, use the SQL-92 to connect left out. The following are the query results of the left Outer Join of transact-SQL:
Use pubsSelect a. au_fname, A. au_lname, P. pub_
Copy codeThe Code is as follows: declare @ TotalCount int
Declare @ TotalPageCount int
Exec P_viewPage_A 'type1', '*', 'id', ', 'Id asc', @ TotalCount output, @ TotalPageCount output
Select * from type1
Create PROC P_viewPage_A/*Nzperfect [no_mIss] efficient and common paging Stored Procedure (bidirectional retrieval) 2007.5.7 QQ: 34813284Tip: Applicable to tables or views with a single primary key or a unique value columnPs: the SQL statement is 800
After SQL optimization, the query speed can be greatly improved.
The code is as follows:
/**
* @ Filename: page. SQL. class. php
* @ CreatTime: 2009-01-06
* @ Descrition: This class is an SQL statement processing class.
* @ UpdateTime-1: null
* @ Version: jswweb1.0.0
* @ Author: fkedwgwy
* @ Dome:
$ SQL // SQL statement
$ Allcount // total number of records
$ Pagesize // number of records displayed on the page
$ Page // current page
$ Sqlc = new sqlpage ($ SQL, $ allcount, $ pagesize, $ page )
The so-called subquery is the embedding of several small queries within a query.
Grammar:Select "Distinct" * | column name "Alias", Column name "Alias" ... | Statistical functions, (select "DISTINCT" *| column name "Alias", Column name "Alias" ... | Statistical functionsFrom data table "alias", Data table "Alias" ..."Where condition (s)""Group by Group field, Group field, ...""Having group after filter""Order By Field" Asc|desc ", Field"
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.