---restore content starts---
C # operation of the MySQL database stored procedure, URL
The DATEDIFF () function returns the number of days between two dates. syntax DateDiff (DATE1,DATE2) date1 and Date2 parameters are valid dates or dates / time expression. Note: Only the date part of the value participates in the calculation. Example 1 Use the following SELECT statement: Select DATEDIFF ( "
can use the DESC keyword to sort the result set in descending sequence. Cases:Ascending: SELECT * FROM table name order by column name;Descending: SELECT * from table name order by column name Desc;In Terminal input: SELECT * from Persons order by name;SELECT * from persons the Order by ID;SELECT * from persons order by id DESC;Four, SQLite C language programming1, int sqlite3_open (char *db_name,sqlite3 **db);Function: Open the database.Parameters:
TABLE table_name ADD column_name NVARCHAR (not) NULL DEFAULT (")
4, less with the text and image, binary field read and write is relatively slow, and, read the method is not much, most of the cases it is best not to 5, add a unique constraint to the self-increment column separately when building the self-increment column If you want to ensure that the ID is unique, only set self-increment not, you need to set a primary KEY or a unique constraint
the order that they are specified, helping to get the information more quickly. In general, you need to create an index on a table only if you frequently query the data in an indexed column. The index consumes disk space and affects the speed at which data is updated. But in most cases, the data retrieval speed advantage that the index brings is much more than its shortcoming. 2. B + Tree application in database
Label: In many cases, the application needs to implement the Excel data import function, the data if only dozens of, or hundreds, even thousands, the speed is OK. But not only that, if the customer provides you with the Excel itself has duplicate data, or some of the data in Excel already exists in the database, then, before inserting data into the database you
Last week wrote an article, database aspects of interview skills, how to display their ability from the table, courtesy of the administrator to lift, put in the home, but also thanks to you love, two days in the harvest of nearly 770 clicks, also once entered the 48-hour hot list.In order to thank the Administrator and everyone for their support, and then based on my interview experience, an original article on how the index to promote their own artic
speed, but too many indexes affect the input write.Some habits of using tables1. As we write Java programs, we can use the Apache Commons Toolkit, the use of Oracle's own internal functions can not only improve the development efficiency, but also improve the efficiency of SQL statement execution;2. Try to write SQL statements as dm=? , and then assign a value instead of direct dm=9, so that Oracle compile
Original link: http://www.2cto.com/database/201303/195303.html, Mysqlslap introduction Mysqlslap MySQL5.1 is a benchmark benchmark tool, similar to the Apache Bench load generation tool, generates schema, loads data, executes Benckmark and queries data, and is simple, flexible and easy to use. The tool can simulate multiple clients concurrently issuing query updates to the server, giving performance test da
what is a MySQL subquery?
subqueries, also called internal queries, are called external queries, as opposed to internal queries, which contain internal queries. Subqueries allow a query to be nested within another query.
MySQL Database subquery features: Any place where an expression can be used, you can use a subquery, as long as he returns a single value, the subquery by the number of return values, the
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.