[]Chszs, reprint need to indicate. Blog home:Http://blog.csdn.net/chszsIi. Common functions of H2Current_date: Take the current dateCurrent_time: Take the current timeCurrent_timestamp: Take the current date timeLOWER: String lowercaseUPPER: String CapitalizationCONCAT: String linkChar:ascii value to characterASCII: Character representable ASCII valueENCRYPT: Encryption function, support AES algorithm, block size is 16 bytes,such as Call ENCRYPT (' AES ', ' xx ', STRINGTOUTF8 (' Test '))DECRYPT:
PostgreSQL 9.4 is loading a new feature called JSONB, a new type of data that can store JSON data that supports gin indexes. In other words, this feature, in the upcoming update, most importantly, if this is not important, then put Postgres in the file as the recommended location for the database system.
Since 9.2, a consolidated JSON data type already exists with a complete set of features (such as data generation and data deconstruction) and 9.3 ne
highest priced car: Select *from car where price= (select Max (price) from car);(10) Paging querySELECT * FROM car limit 0,10 #分页查询, skip a few data (0) take a few (10)Specify a number of bars to display per page: MCurrent page: NSELECT * FROM car limit (n-1) *m,m Skip (n-1) *m strip data take M bar(11) Go to re-querySelect distinct brand from car(12) Group queryCheck the number of cars under each series in the car tableSelect Brand,count (*) from car GROUP by brandAfter grouping, only the colu
"${update_sql}"Mysql-h${hostname}-p${port}-u${username}-p${password} ${dbname}-E "${select_sql}"#删除数据Delete_sql= "Delete from ${tablename}"Mysql-h${hostname}-p${port}-u${username}-p${password} ${dbname}-E "${delete_sql}"Mysql-h${hostname}-p${port}-u${username}-p${password} ${dbname}-E "${select_sql}"Show Processlist How to filter the problem I finally know how to fix it.MYSQL-UROOT-E-p password ' show processlist\g ';Mysql-uroot-e ' show processlist\g ' |grep ' Info ' |grep-v "NULL" |awk-f ":"
Label:MYSQL-HHOSTNAME-PPORT-UUSERNAME-PPASSWORD-E mysql-related SQL statements without running MySQL at the prompt of MySQL, which means you can manipulate MySQL in the shell. #!/bin/Bash HOSTNAME="192.168.111.84"#数据库信息 PORT="3306"USERNAME="Root"PASSWORD=""DBNAME="test_db_test"#数据库名称 TABLENAME="test_table_test"#数据库中表的名称 Create a database Create_db_sql="CREATE database IF not EXISTS ${dbname}"
-h${hostname
Data | database | data type///Comparison of data types in the database with C #
private string Changetocsharptype (String type)
{
String reval=string. Empty;
Switch (type. ToLower ())
{
Case "int":
Reval= "Int32";
Break
Case "Text":
Reval= "String";
Break
Case "bigint":
Reval= "Int64";
Break
Case "binary":
Reval= "system.byte[]";
Break
Case "bit":
Reval= "Boolean
Tags: BSP field HTTP processing Add database oat share length1. Integral typeThe selection principle of integral type:First: To satisfy the field's representation rangeSecond: Try to choose a data type that takes up less spaceThird: If you do not store negative numbers, try adding the unsigned property2. Floating-point type The selection principle of integral type:First: To satisfy the field's representation rangeSecond: Try to choose a data type tha
Label:Types of database functions: Statistical functions: AVG (averaging), sum (sum), count (count), Max (max), min (minimum) Arithmetic functions: 1. Trigonometric Function-- Sin (float_expression)--Returns the sine of the angle in radians COS (float_expression)--Returns the cosine of a corner in radians TAN (float_expression)--Returns the tangent of a corner in radians COT (float_expression)--Returns the cotangent of the angle in radians 2. Inverse
# int 0 ~ More than 4 billion# Mediumint 0 ~ more than 16 million# smallint 0 ~ 65535# tinyint 0 ~ 255# varchar (5) and char (5) What's the difference?# varchar (5) Can I save ' abcdef '? The same cannot be saved!# as stored ' abc ' char (5), 5 characters, byte: gbk/Kanji * * utf8/Chinese characters# in the case of ' ABC ' varchar (5), 4 characters (it will be added by default), Bytes: gbk/Kanji * * utf8/Kanji# Char,varchar,text max length?# char: maximum of 255 characters# varchar: Up to 65,535
Tags: color objects type select Val Table name Export Data desc ObjectSELECT(case if A.colorder=1 then d.name Else ' end) Table name,A.colorder Field Ordinal,A.name Field Name,B.name field type,b.length field Length,G.[value] As Field descriptionFrom syscolumns a LEFT join systypes bOn A.xtype=b.xusertypeINNER JOIN sysobjects DOn a.id=d.id and d.xtype= ' U ' and d.nameLeft Join Sys.extended_properties GOn a.id=g.major_id and a.colid = g.minor_id--where D.[name] --where D.[name] = ' cityhot '-the
Label: Reprint Original AddressHttp://www.cnblogs.com/Fooo/archive/2009/08/27/1554769.htmlSELECT (case if A.colorder=1 then d.name Else ' end) Table name, A.colorder field ordinal, a.name field name, when Colum Nproperty (a.id,a.name, ' isidentity ') =1 then ' √ ' Else ' "End", (case when (SELECT count (*) from SYSO
Bjects WHERE (name in (SELECT name from sysindexes WHERE (id = a.id) and (Indid in (SELECT indid F ROM Sysindexkeys WHERE (id = a.id) and (Colid in (S
Rails Brochure3.8 UsechangeMethod1. Add a field to a tableRails g Migration Add_column_to_d_groups_equip_numclass Addcolumntodgroupsequipnum ] def change add_column:d _groups,: Equip_num,: Integer endend2. modifying table field typesRails g Migration Change_column_to_d_groups_equip_numclass Changecolumntodgroupsequipnum ] def Change change_ Column:d _groups,: Equip_num,: string endend3. Modify the name of the table fieldRails g Migration Change_column_to_d_groups_equip_num_equio_numsc
6 SQL Server is a server-level database, the use of more stringent requirements, you must enter a username and password to use.
Function createsqlserverrecordset (computer name, user ID, user password, database name data table or view table or select instruction)
Dim Params, Conn
Set creatsqlserverconnection = Nothing
Set conn = Server.CreateObject ("ADODB. Connection ")
Params = "Provider=SQLOLEDB.1"
Param
Connecting to the SQL Server database
The code is as follows
Copy Code
Using System;Using System.Collections;Using System.ComponentModel;Using System.Data;Using System.Data.SqlClient;Using System.Drawing;Using System.Web;Using System.Web.SessionState;Using System.Web.UI;Using System.Web.UI.HtmlControls;Using System.Web.UI.WebControls; Namespace ZZ{Summary description of the classconn.public class conn//
In database development, through the implementation of a single table, sometimes we need to combine queries to find the recordset we need, at which point we will use the connection query.
The connection query mainly includes the following aspects:
INNER JOIN
The inner joins are generally the most commonly used, also called Natural joins, which compare the values of the columns to be joined by comparison operators. It connects multiple tables throug
Data type
Integral typeFloating point TypeBoolean typeStringArrayObject
Conversion between types(int) $val; Convert to integral type
(float) $val; Convert to floating point type
(string) $val; Convert to String
(bool) $val; Convert to Boolean type
(array) $val; Converts an array that contains only one element of $val. [$val]
(object) $val; Convert to an object, the scalar property of the object points to $val. {scalar: $val}
Get typeUse the functio
073 858 507 201 4 E-308, 1.797 693 134 862 315 7 E + 308) 0, (2.225 073 858 507 201 4 E-308, 1.797 693 134 862 315 7 E + 308) Double Precision Floating Point Value
DECIMAL on DECIMAL (M, D). If M> D is M + 2, otherwise, D + 2 depends on M and D. The value depends on M and D.
INT type:
The five major integer types supported in MySQL are TINYINT, SMALLINT, MEDIUMINT, INT, and BIGINT. These types are largely
Label:Hibernate API IntroductionIts interface is divided into the following categories: lAn interface that provides access to the operation of the database;Lan interface for configuring hibernate;LCallback InterfaceLAn interface that extends hibernate's functionality. Most of these interfaces are located in the Net.sf.hibernate packageHibernate 's core interface 5 Core interfaces: lConfiguration Interface: Configure Hibernate, Root start Hibernate, cr
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.