Function Encrypt (Thenumber)
On Error Resume Next
Dim N, Szenc, T, HiN, LoN, I
n = CDBL ((thenumber + 1570) ^ 2-7 * (Thenumber + 1570)-450)
If N n = CStr (ABS (n))
For i = 1 to Len (n) Step 2
t = Mid (n, I, 2)
If Len (t) = 1 Then
Szenc = Szenc T
Exit for
End If
HiN = (CInt (t) and 240)/16
LoN = CInt (t) and 15
Szenc = Szenc CHR (ASC ("M") + HiN) CHR (ASC ("C") + LoN)
Next
Encrypt = Szenc
End Function
Fun
function | decryption | string Function Encrypt (Thenumber)
On Error Resume Next
Dim N, Szenc, T, HiN, LoN, I
n = CDBL ((thenumber + 1570) ^ 2-7 * (Thenumber + 1570)-450)
If N n = CStr (ABS (n))
For i = 1 to Len (n) Step 2
t = Mid (n, I, 2)
If Len (t) = 1 Then
Szenc = Szenc T
Exit for
End If
HiN = (CInt (t) and 240)/16
LoN = CInt (t) and 15
Szenc = Szenc CHR (ASC ("M") + HiN) CHR (ASC ("C") + LoN)
Next
E
, ACTIVE2sec starting index read MySQL tablesinchUse1, Locked1LOCK WAIT2 Lock struct(s), Heap size376,1RowLock(s) MySQL thread ID -, OS thread handle0x7f70a0bd5700, Query ID993localhost root updating update t3Setbirthday='2018-01-03' whereID = +-------TRX has BEEN waiting2SEC for this LOCK to be Granted:record LOCKS space ID529Page no3N Bits theIndex ' PRIMARY ' of table ' test '. ' T3 ' Trx ID189326lock_mode X Waiting RecordLock, Heap No2Physical Record:n_fields9; Compact format; Info bits0
0
joins are sometimes ambiguous, so it is recommended to use the SQL-92 language
Method.
Using a LEFT OUTER join
Suppose you join the authors table and the publishers table on the city column. Results are displayed only in
Author of the city where the publisher resides (in this case Abraham Bennet and Cheryl Carson
)。
To include all authors in the results, regardless of whether the publisher lives in the same city, use the sql-
92 left outer joins. The following are queries and results for
SQL-92 syntax be used.
Using a LEFT OUTER join
Suppose you join the authors table and the publishers table on the city column. The results are displayed only for authors residing in the publisher's city (in this case, Abraham Bennet and Cheryl Carson).
To include all authors in the results, regardless of whether the publisher lives in the same city, use the SQL-92 left outer join. The following are queries and results for Transact-SQL left-outward joins:
Use pubs
SELECT A.au_fname, A.au_lnam
We often use the List
At this time, we need to expand a sorting method by ourselves. Below I will give a class inherited from the IComparer interface, which has built-in sorting rules for ascending and descending order:
[Csharp]/// /// Inherit from the IComparer /// /// Public class Reverser {Private Type type = null;Private ReverserInfo info;/// /// Constructor/// /// /// /// Public Reverser (Type type, string name, ReverserInfo. Direction direction){This. type = type;This.info. name = name;If
specified column names
SELECT c.id, c.name, c.ageFROM t_regcustomer c;
3. Sort query results
SELECT c.id, c.name, c.ageFROM t_regcustomer cORDER BY c.age ASC;
4. like Fuzzy search
% Match any number (0 ~ N) any character
SELECT c. id, c. name, c. ageFROM t_regcustomer cWHERE c. name LIKE '% Peng %' order by c. age ASC;
5. regexp keyword
. Match any character
Note that there are no start (^) and end ($)
database management system, but also ensures the uniqueness of fields. The database table is unique.
Six indexes: Common Index, unique index, full-text index, single-column index, multi-column index, and spatial index
Advantages and disadvantages:
Advantage: Improves search speed
Disadvantage: too many indexes occupy disk space
Suitable for index creation:
1. fields that are frequently queried, that is, fields that appear in the where clause
2. Grouping field, that is, the fi
multiple columns will always automatically create indexes in the form of Composite Indexes. the column sequence is the sequence in which they appear in the table definition, rather than the sequence specified in the primary key definition. In consideration of the future search performed by the primary key, determine which column should be at the top.Note that creating a composite index should contain a few columns, which are often used in select queries. Adding too many columns to a composite i
list [WHERE condition expression 1] [group by attribute name 1 [HAVING condition expression 2] [order by attribute name 2 [ASC | DESC]
Attribute List: name of the field to be queried. Table name or view list: lists the data tables or views to be queried. there can be multiple tables or views. Condition expression 1: Set the query conditions. Attribute name 1: Group by data in this field. Conditional expression 2: indicates that only data that meets t
can use indexes to reduce sorting and which sqls cannot. Suppose that the table t1 has an index key1 (key_part1, key_part2), key2 (key2)
A. You can use indexes to avoid sorting SQL statements.
SELECT * FROM t1 ORDER BY key_part1,key_part2;SELECT * FROM t1 WHERE key_part1 = constant ORDER BY key_part2;SELECT * FROM t1 WHERE key_part1 > constant ORDER BY key_part1 ASC;SELECT * FROM t1 WHERE key_part1 = constant1 AND key_part2 > constant2 ORDER BY key_
)
Normally return to the page, so we can know that the Administrator account is greater than 4!
We continue,
Http://www.target.com/movie.asp? Id = 330 and 1 = (select ID from password where Len (name)>
"The webpage cannot be displayed". An error occurred, so we can know that the Administrator's account is greater than or equal to 8 digits.
Let's come back,
Http://www.target.com/movie.asp? Id = 330 and 1 = (select ID from password where Len (name) = 8)
Returns the page normally.
Name is 8 bits
Si
procedure.1. Top pages in SQL Server 2000
Create procedure [zhzuo_getitemspage]@ Pageindex int,/* @ pageindex from Count, 0 is the first page */@ Pagesize int,/* page size */@ Recordcount int out,/* Total number of records */@ Pagecount int out/* page number */As/* Obtain the number of records */Select @ recordcount = count (*) from production. Product/* Calculate page data */Set @ pagecount = ceiling (@ recordcount * 1.0/@ pagesize)/* Number of top records */Declare @ topcount intSet @ topcoun
the server as follows:New_nc.connect ("rtmp:/doc_record/room_01 ");Otherwise, you need to specify the actual server uri (for example, the server runs on myserver.mydomain.com). You can specify the FCS connection as follows:New_nc.connect ("rtmp: // myserver.mydomain.com/doc_record/room_01 ");Note: It is determined that rtmp is followed by a double slash. A single slash can be used only when the SWF file and the FCS are on the same computer.Specify the publishing format. Flashmx can publish an a
Tel School1 Computer Department of 333,333,3332 Li 4,444,444,444 Department of Biology, Sichuan University3 Wang 222,222,222 Architectural Department of Southwest Jiaotong University... ... ... ...
The web search interface is as follows:
Name: Tel: School: Search button
The source program using the enumeration method is as follows:
Copy Code code as follows:
' Connect to the database
Dim conn
Dim Dboath
Dim rs
Dim sql
Set conn=server.createobject ("ADODB. Connection ")
DBP
Name 1 ... Column name n from
(SELECT column Name 1 ... Column name n from table name order BY column name 1 ... Column name N)
WHERE rownum
ORDER BY RowNum ASC
Here's a quick example to illustrate.
Customer table Customer (Id,name) has the following data:
ID NAME
-A
Second
Third
Forth
Fifth
Modified Sixth
Modified Seventh
Eighth
Ninth
Ten Tenth
One last
The SQL statements for the first three customers by name let
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.