Best practices for Database Design 1. Use well-defined tables or column names and maintain consistency (for example, School, StudentCourse, CourseID ). 2. Use the table name in the singular form (that is, use StudentCourse instead of StudentCourses )
Set the default MySQL encoding method. When you create a Database, the system latin is limited by default. You can modify it by modifying my. set the default encoding of mysqld In the INI file (restart required ). MySQL [mysqld]
Today, the HSQL statement written in hive is repetitive pv and uv computing. In addition, After calculating the total categories, such as pv and uv computing on the pc end, pv and uv on the mobile end, and then calculate the total pv and uv. The
The string for parsing the comma-separated information is the table without CREATEFUNCTIONdbo. parsecsvstr (@ listVARCHAR (500) returns @ tblTABLE (strVARCHAR (20) ASBEGINDECLARE @ valuelenINT, @ posINT, @ nextposINTSELECT @ pos0, @ nextpos1WHILE @
There is no SQL statement in Oracle to check the difference in permissions between roles. 1. view the system permissions of the current user. select * fromsession_privs; 2. view All roles in the database, selec * fromdba_roles; 3. view the maximum
On a server whose system environment is rhel6.5, the two node RAC with the database version oracle11.2.0.4 is set up. The following error occurs when installing the GRID: (Note: vote, data, and flashback are on the storage device)
Sometimes, the displayed data is displayed until this month, or the value of all months of the current year until the selected month. SQL month selectlpad (rownum
Sometimes, PL/SQL displays the data until this month or the values of all months of
AES_ENCRYPT (
AES_ENCRYPT (
In MySQL, The AES_ENCRYPT ('Password', 'key') function can encrypt field values.
AES_DECRYPT (Table field name, 'key') function decryption
For example, table structure:
Insert a piece of data to encrypt the
It mainly formats the display of columns. This command has many options: COL [UMN] [{column | expr} [option] Option option can be the following clause: ALI [AS] aliasCLE [AR] FOLD_A [FTER] FOLD_ B [EFORE] FOR [MAT] formatHEA [DING] textJUS [encoding]
Change the table owner to dbo. When other users log on to the remote database, the new table owner is not dbo. To change the table owner to dbo, use the following statement to operate .www.2cto.com for batch modification: program code
Statement 1. ORACLEwww.2cto. comSELECT * statements. INFORMIXSELECTFIRSTN * statements. DB2SELECT * ROW_NUMBER () OVER (ORDERBYCOL1DESC) ASROWNUMWHEREROWNUMN or SELECTCOLUMNFROMT
The statement for the database to take the first few records 1. ORACLE
After mongodb deletes a set, the disk space is not released. After mongodb deletes the set, the disk space is not released. It can be released only after db. repairDatabase () is used for restoration. However, if an abnormal mongodb instance fails
The RECORDS_PER_BLOCK parameter -- RECORDS_PER_BLOCK is used to set the maximum number of records in each BLOCK. First, the maximum number of rows in all blocks of the current table is found, this number is recorded in the data dictionary. Any
In earlier versions, it is much easier to adjust the Innodb_Buffer_Pool_size to take effect only after the mysql process is restarted. Application scenarios of this function: 1. Increase the memory on the machine. The DBA is careless and forgets to
## Mvusrlocalpostrgresql-8.4.14d
Postgresql database restore time point based on archive logs 1. Postgresql database restore www.2cto.com Based on archive logs 1. Back up the running data DIRECTORY # mv data data_bak 2. decompress the full backup to
1. the SQL statement exported by MySQLdump is quite slow when it is imported to other databases, or even dozens of seconds before processing an SQL statement. After repeated tests, two parameters are found to affect the import speed. --
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service