1.J handling of large text types in DBClarge text data types in Oracle,Clob Long Text type ( not supported in MySQL, using text)Blob binary TypeMySQL Database,Text long Text typeBlob binary TypeRequirements: manipulate long text data in JDBC. Design: Test TableCoding:Saving large text data typesReading large text data typesSaving binary dataRead binary dataMysql:
Is the difference between several character types in the database, which should be known. There is one more thing to mention. varchar and nvarchar are variable-length character types, but will only grow in scope, such as the limit of varchar (20) is 20 bytes, if the value exceeds 20 bytes will be intercepted, and will not automatically grow. So later in the defin
join. SELECT o.id,o.order_number,c.id, c.name from ORDERS O cross JOIN CUSTOMERS C WHERE o.id=1; The results of statement 1 and statement 2 are the same, and the query results are as follows:Two , INNER join (INNER join ) (INNER join): There are two, explicit and implicit, that return data rows in the join table that meet the join criteria and query criteria. (The so-called link table is the database in the form of queries formed in the intermediate
1. Index definitionA database index is like a directory in front of a book, speeding up the query speed of a database. An index is a structure that sorts the values of one or more columns in a database table (for example, the last name (lname) column of an employee table). If you want to find him or her by the name of a particular employee, the index helps you ge
data type (mysql)Int char bit varchar date time datetime textCharacter:Char Normal string (how much is honestly accounted for)Varchar variable string ( how much to use)(characters are said to be the number of characters.) Bytes are said to store the size of the text)(except The ASCLL (0~127) Code series accounts for 1 bytes. The others are two bytes)Text large text does not set length (16kb)Longtext Maximum TextDateTimeDateDatime ( eight bytes )(month, day, minute and second)Common data typesInt
[]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
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.