Simple string comparison results are imprecise.select*from表明wheretimes>‘2088/12/8 10:02:40‘(x)The conversion function is as follows (the database is varchar):select*fromh_hotelcontextwherenow()betweenSTR_TO_DATE(Start_time,‘%Y-%m-%d %H:%i:%s‘)andSTR_TO_DATE(End_time,‘%Y-%m-%d %H:%i:%s‘);selectmax(addtime)fromstudentwhere stuid=‘9‘;(×)selectmax(STR_TO_DATE(addtime,‘%Y/%m/%d %H:%i:%s‘))fromstudent wherestuid=
Tags: text many speed minimum style and Ext Max classDbcpDBCP may be the most used open source connection pool, probably because of the ease of configuration, and many examples of open source and Tomcat applications are used for this connection pool.This connection pool can set the maximum and minimum connections, connection waiting time, etc., basic functions are available. The configuration of this connection pool is described in the attachment compression package: Dbcp.xml.Usage Evaluation: I
Label:Exists: Usage: SELECT * FROM table1 where exists (SELECT * from table2 where table1.id = table2.id)Returns records with the same ID in Table1 and table2 (double loop) result and in syntax, thinking differently,In:select * FROM table1 where ID in (select ID from table2)2 ideas are different: exists: first get each table1 data, and then get the ID field, go to table2 table to find the corresponding value, find the description matches the conditionIn: The ID probability is obtained first, and
Tags: loading HBA datasets Organization development int checked Storage sub Data Warehouse is a subject-oriented (Subject oriented), integrated (integrate), relatively stable (non-volatile), data collection that reflects historical changes (time Variant). Used to support management decisions. (1) Topic-oriented: Index data in the warehouse is organized according to a certain subject domain. (2) Integration: Refers to the original distributed database
record occupied spaceTruncate [TABLE] table_name [reuse storage];For example: Delete all data from the users table and save space: Truncate table users reuse storage;Comparison of two DELETE statementsSince the DELETE statement deletes the record, the record is deleted one at a time, and the TRUNCATE statement does not produce fallback information when it deletes the data, so if you need to delete large amounts of data, using delete consumes more sys
Tags: http java using OS IO data ar CTIThe purpose of this test is to verify the performance of the current common database connection pool.TestCase Connection conn = dataSource.getConnection(); PreparedStatement stmt = conn.preparedStatement("select 1"); ResultSet rs = stmt.executeQuery(); while (rs.next()) { } rs.close(); stmt.close(); conn.close();
Test Codehttps://github.com/alibaba/druid/blob/master/src/test/java/com/alibaba/drui
table by the dependent constraint (constrain), trigger (trigger), index (index) "Delete table data and delete table structure";Stored procedures/functions that depend on the table are preserved, but become invalid states.The drop statement frees all the space occupied by the table.The speed at which data is deleted, in general: drop> truncate > DeleteUse occasions:When you no longer need the table, use drop;When you still want to keep the table, but to delete all records, use truncate;When you
features, including acid transaction support. If you need to perform a large number of insert or update operations in your app, you should use InnoDB, which can improve the performance of multiple user concurrency operations.
Common commands:(1) View the storage type of table (three kinds):
Show CREATE TABLE TableName
Show table status from DBName where Name=tablename
Mysqlshow-u user-p password--status dbname tablename
(2) Modify the table's storage engine:
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
contain only the index of the field, but in the MyISAM table, you can establish a federated index with other fields better and faster auto_increment processing
If you specify a auto_increment column for a table, the InnoDB table handle in the data dictionary contains a counter called the autogrow counter, which is used to assign a new value to the column. The autogrow counters are stored only in main memory, not on disk algorithmic implementations of the calculator, see
Tags: ar data sp div c ad R EF BS
Oracle
Mysql
Mssql
Returns the start character in a string (from left)
INSTR
INSTR
CHARINDEX
Sub-string
SUBSTR
SUBSTRING
SUBSTRING
String length
LENGTH
LENGTH
Len
Returns the leftmost character of Len starting with the string str
Left
Left
Returns the right-most Len character starting from the string str
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.