Asp.net subject (V)

Source: Internet
Author: User

Table:

Table B:

 

1. Select * from a join B on A. ID = B. ID:9Parameter. Inner join (equivalent join) returns only rows with equal join fields in two tables.

 

 

2. Select * from a left join B on A. ID = B. ID:12Parameter. (Left join) returns records that include all records in the left table and join fields in the right table.

3. Select * from a right join B on A. ID = B. ID:10Parameter. (Right join) returns records that include all records in the right table and the joined fields in the left table)

 

4. Select * from a, B where a. ID = B. ID

Equivalent to internal connection

 

5. Locate Table A, and record it between age 18 and 20.

Select * from a where (age between 18 and 20)

 

(If the value of test_expression is greater than or equal to the value of begin_expression and less than or equal to the value of end_expression, between returns true .)

6. Find the names of the first two students in a unit score.

Select [name] from a join

(Select top (2) ID, max (score) as score from B group by ID order by score DESC) as AA

On a. ID = AA. ID

 

 

 

7. Upload a stored procedure and request the upload ID to find the name and highest score of the ID pair. The system returns name: score,

Example: limit 6: 90

 

Alter proc [sp_totalscore]

@ ID int,

@ Return nvarchar (100) Output

As

Begin

Declare @ name nvarchar (50)

Declare @ score int

Select top 1 @ name = A. Name, @ score = B. Score

From a join B on A. ID = B. ID

Where a. ID = @ ID

Order by B. Score DESC

Set @ return = @ name + ':' + Cast (@ score as nvarchar (50 ))

End

 

 

 

// Print

Declare @ return nvarchar (50)

Execute sp_totalscore 6, @ return output

Print @ return

 

 

 

 

 

Parse Dom?

Dom (Document Object Model)

Dom is the abbreviation of Document Object Model. According to W3C DOM specification (http://www.w3.org/DOM/), Dom is a language-independent interface that allows you to access other standard components of the page. Dom solves the conflict between Netscape JavaScript and Microsoft JScript, and provides a standard method for web designers and developers, let them access the data, scripts, and representations on their sites.

 

What is soap? For example, what are the operations of region?

(Soap: Simple Object Access Protocol)

Simple Object Access Protocol (SOAP) is a lightweight, simple, XML-based protocol designed to exchange structured and solidified information on the Web. Soap can be used in combination with many existing Internet protocols and formats, including Hypertext Transfer Protocol (HTTP), Simple Mail Transfer Protocol (SMTP), and multi-purpose Internet Mail Extension protocol (MIME ). It also supports a large number of applications from the message system to Remote Process calling (RPC.

 

 

What is COM component?

Com, a component object model, describes how to create components and how to use components to create applications.

Com is a method for developing software components. Components are actually some small binary executable programs that can provide services to applications, operating systems, and other components. Developing custom COM components is like developing dynamic and object-oriented APIs. Multiple COM objects can be connected to form an application or component system. In addition, components can be removed or replaced at runtime without being relinked or compiled. Many Microsoft technologies, such as ActiveX, DirectX, and OLE, are built based on COM. Microsoft developers also use COM components to customize their applications and operating systems.

 

 

What is wm_keydown? Wm_command?

Wm_keydown is a standard message:

All messages starting with WM _ Except wm_command.

Classes derived from cwnd can receive such messages.

Wm_command is a command message:

Messages from menus, acceleration keys, or toolbar buttons. These messages are all presented as wm_command. In MFC, different command messages are distinguished by the menu item ID. In SDK, messages are identified by the wparam parameter. Classes derived from csf-target can receive such messages.

 

Static void main (string [] ARGs)

{

Int I = 0;

Object o = I;

I ++;

 

Stringbuilder sb = new stringbuilder ("1 ");

Setobject (O, Sb );

Console. writeline ("{0}, {1}, {2}", I, O, Sb); // 1, 0, 11

}

 

 

Static void setobject (Object o, object O1)

{

O = (INT) O + 1;

(Stringbuilder) O1). append ("1 ");

}

 

 

 

Employeewage table

Field ID, employeename, prize, basewage

Work is equal to the cost plus basic work information

Find the employee with the highest salary, employee name (MSSQL Statement)

 

 

Select top (1) ID, employeename

From employeewage

Group by ID, employeename

Order by sum (basewage + Prize) DESC

 

 

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.