Side translation: Script
SQL is a standard that works in conjunction with database programs language , these database programs include MS Access ,DB2 ,Informix ,MS SQL Server ,Oracle ,MySQL ,Sybase and so on.
SQL function statements (with many built-in functions) plus SQL conditional statements.
2. aggregate functions, such as SUM, often require the addition of a GROUP by statement.
GROUP by Statement
GROUP by statements are used in conjunction with aggregate functions to group result sets based on one or more columns.
SQL GROUP by Grammar
SELECT column_name, aggregate_function (column_name)
From table_name
where column_name (column) operator (operator) value (value)//(WHERE clause) where column operator values
。
GROUP by column_name// group the results.
SQL uses single quotation marks to wrap text values (most database systems also accept double quotes). If it is a numeric value , do not use quotation marks.
Text value:
That's right:
SELECT * from Persons WHERE firstname= ' Bush '
This is wrong:
SELECT * from Persons WHERE Firstname=bush
Numerical:
That's right:
SELECT * from Persons WHERE year>1965
This is wrong:
select * from persons where year> ' 1965 '
In addition to numbers without quotes, the other add quote WHERE clauses combine AND and OR operators we can also put AND and OR Combine (use parentheses to form complex expressions):select * from persons where (firstname= ' Thomas ' OR Firstname= ' William ') and lastname= ' Carter ' sql View considerations: 1. In SQL , the view is based on SQL A visual table of the result set of the statement. 2. The view contains rows and columns, just like a real table. A field in a view is a field from a real table in one or more databases. We can add SQL functions, where , and JOIN statements to the view, and we can also submit the data as if it came from a single table. Note: The design and structure of a database is not affected by functions, where , or join statements in the view. Note: Views always display the most recent data. Each time a user queries the view, the database engine rebuilds the data by using the SQL statement. Syntax Example: create view [current product list] (depending on the chart name) asselect productid, ProductName (column name) from products (table name) where discontinued=no (conditional) ado objects have two types of properties: Built-in and dynamic. Built-in properties are properties that are implemented in ADO and immediately available to any new object, using the myobject.property syntax. They do not appear in the Properties collection of objects as Property objects, so although you can change their values, you cannot change their properties. The ado property object represents the dynamic nature of the ADO object, and the dynamic property is proviDefined by the der . Each provider has a different way to interact with ADO in the ADO dialog. So,ado need some way to store information about provider . The workaround is to provider provide specific information (dynamic properties) for ADO . ado stores each provider attribute in a Property object, and the Property object is stored accordingly in the properties in the collection. This collection is assigned to the Command object, the connection object, the field object , or the Recordset object. For example, a property assigned to a provider might indicate whether the Recordset object supports transactions or updates. These additional properties appear as Property objects in the Properties collection of the Recordset object. ADO each object. Command (simple query) connection (and Database link) error (collect error message) field ( Corresponds to a column) parameter (provides parameter information) property (dynamic property) record (accommodates a file/record/information) Recordset (holds recordset) stream (handles binary data or text flow) MVC (model model view View controller control) The efficient lightweight visual studio express is a development tool tailored for MVC (and web forms). mvc is a box for building web applicationsRacks, using MVC (Model view controller) Design: Model represents the core of the application (such as a list of database records) view (view) displays data (database records) to display the controller (Controller) to process input (write database records) mvc model also provides the html, Full control of CSS and JavaScript . The mvc model defines web applications through three logical tiers: business layer (business layer, model logic) display Layer (display layer, view logic) Input control (input control, controller logic) xml is also a markup language 1. Independent ability to troubleshoot log location issues
SQL and Ado notes