renaming a column alter table table_name rename column old_column_name to new new_column_name; Truncate table TRUNCATE TABLE [schema.] Table [{DROP | REUSE} STORAGE] The effect of using this command are as follows: • all rows in the table are deleted

SQLite study notes (a) Reprinted from http://www.cnblogs.com/Acuzio/archive/2008/09/09/1287958.html (1) create a database on the command line switch to sqlite.exe the folder, type in the command sqlite3 test.db; to create a database called test.db th

set node has the following properties (taken from the Hibernate documentation): (1) name the collection property name (2) table (optional?? Defaults to property name) the name of the collection table (not in use-many association) (3) schema (optional

Lock Overview I. Why should the introduction of the lock Multiple users simultaneously concurrent operation of the database will have the following data inconsistencies: Lost update A, B two users to read and modify the same data, the results of one

Version: 0.20.x Configuration HBaseConfiguration every hbase client will use to the object, which represents the HBase configuration information. It is constructed in two ways: public HBaseConfiguration () public HBaseConfiguration (final Configurati

Using the cursor, found the last line has been read repeatedly Later in that the data should be read on the next loop, use to avoid duplication Code is as follows: DELIMITER $ $ USE `test` $ $ DROP PROCEDURE IF EXISTS `sp_getAllTableName` $ $ CREATE

zz from: http://blog.sina.com.cn/s/blog_5183d2c80100hw95.html A database instance can have multiple schema (solution) Each schema can only belong to one user that you specify the user and the database instance, to determine the solution =============

Oracle today just know that there is a statistical function of the index, you can count the frequency of use of each index. Oracle as a layman, I sigh again, others do is really detailed. The second idea is to also add MySQL. Percona version informat

Lock Overview I. Why should the introduction of the lock Multiple users simultaneously concurrent operation of the database will have the following data inconsistencies: Lost update A, B two users to read and modify the same data, the results of one

Data Integrity Database not only stores data, it must also ensure the correctness of the saved data . If the data is incorrect or inconsistent, then the data integrity may be compromised , The reliability of the database itself to bring to unexpected

Data integrity is not just a database to store data, it must also ensure the correctness of the data it holds. If the data is incorrect or inconsistent, then the integrity of the data may be destroyed, thus the reliability of the database itself brin

Create and manage objects in the database table: a table, views, indexes, sequences, synonyms, etc. Table: a collection of basic data storage by rows and columns view: from the table out of a collection of logically related data. Sequence: to provide

Data integrity is not just a database to store data, it must also ensure the correctness of the data it holds. If the data is incorrect or inconsistent, then the integrity of the data may be destroyed, thus the reliability of the database itself brin

Create and manage objects in the database table: a table, views, indexes, sequences, synonyms, etc. Table: a collection of basic data storage by rows and columns view: from the table out of a collection of logically related data. Sequence: to provide

Ninth, data integrity Database not only stores data, it must also ensure the correctness of the data it holds. If the data is incorrect or inconsistent, then the integrity of the data may be destroyed, thus the reliability of the database itself brin

Data integrity is not just a database to store data, it must also ensure the correctness of the data it holds. If the data is incorrect or inconsistent, then the integrity of the data may be destroyed, thus the reliability of the database itself brin

Show you all the fragments present in the database list: select table_schema, table_name, data_free, engine from information_schema.tables where table_schema not in ('information_schema', 'mysql') and data_free> 0; If you find some of the list contai

Creating and managing tables Objects in the database: there are tables, views, indexes, sequences, synonyms, etc. Table: a collection of basic data storage by rows and columns View: from the table out of a collection of logically related data. Sequen

Data Integrity Database not only stores data, it must also ensure the correctness of the data it holds. If the data is incorrect or inconsistent, then the integrity of the data may be destroyed, thus the reliability of the database itself bring unexp

constraints in oracle Data Integrity Database not only stores data, it must also ensure the correctness of the data it holds. If the data is incorrect or inconsistent, then the integrity of the data may be destroyed, thus the reliability of the datab

Online are some of the static structure with CASE WHEN achieved. So I wrote a dynamic. SP code: DELIMITER $$DROP PROCEDURE IF EXISTS `test` . `sp_row_column_wrap` $ $CREATE DEFINER= `root` @ `localhost` PROCEDURE `sp_row_column_wrap` ( IN $schema_nam

Use of system databases such as: select remarks from SYSIBM.SYSCOLUMNS where tbname = 'aaa'; SYSIBM.SYSCOLUMNS NAME Field name TBNAME table TBCREATOR Table Schema REMARKS Comments COLTYPE field type Can be NULL NULLS CODEPAGE DBCSCODEPG LENGTH field

Original Transfer: http://solodu.iteye.com/blog/452968 MySQL 5 from the start, you can see a more system database information_schema. Information_schema database storing all other information. Let's look at a few examples of using this database: <! -

1.data a brief description of the folder file list 1>. Data folder under the folder corresponding to the Mysql database in the database, but each folder frm file and the corresponding data table schema table structure, no data record; 2>. Data direc

In the process of developing to do, many will write to the database test of junk data to the database needs to be officially released, these test data must be cleared away. In front of colleagues with a delete command, combined into a SQL file to exe

MySQL 5 from the start, you can see a more system database information_schema. Information_schema database storing all other information. information_schema is a virtual database, not physically exist in the select time from other databases to obtain

In mysql the following: / / Query all under the current logged in user database select SCHEMA_NAME from information_schema.SCHEMATA / / Name of the database table corresponding to the query SELECT COUNT (*) TABLES, table_schema FROM information_schem

1. SHOW CREATE TABLE You can view the partition table of the CREATE statement to create 2. SHOW TABLE STATUS You can view the partition table if the table 3 See INFORMATION_SCHEMA.PARTITIONS Table SELECT partition_name part, partition_expression expr

Recently, there is a demand for work, need to remove the table structure, re-import the data. Under the guidance of Columbia in Jun, with the following sql script records. declare t1 user_tables% rowtype; t2 varchar2 (100); begin for t1 in (select *

Delete the difference between Oracle and TRUNCATE TRUNCATE and instructions 1, TRUNCATE the table either in a variety of large or small, are very fast. Delete if the ROLLBACK command will be revoked, and TRUNCATE will not be revoked. 2, TRUNCATE is a