Database naming rules summary database naming Rules 1 Objective To standardize naming rules for various database objects. 2 database naming rules 2.1 If the database uses a file system instead of a bare device, the following naming rules are agreed:
Some symbols in mongodb greater than: $ gt greater than or equal to: $ gte less than: $ lt less than or equal to: $ lte not equal to: $ neIN: $ inNOTIN: $ nin remainder: $ mod not: $ not or: $ OR Example 1: Query persons of the age of 20 and 30 in
Sometimes the read/write speed of the OS reduces the performance of the MySQL server, especially when the OS and MySQL use the same disk. Therefore, it is better to make MySQL use a separate disk and use SSD. To achieve
Sometimes the read/write
1. If the date format of YYYYmmdd is converted to null, the following record is displayed. One can get the value, and the other cannot get the value ** mysqlgt; SELECTDATE_FORMAT (STR_TO_DATE (lsquo; 2
1. If the date format of YYYYmmdd is converted
Region encoding without longitude and latitude
Region encoding without longitude and latitude
Region encoding with latitude and longitude
-->
$velocityCount-->
-->
This SQL statement runs in mysql without SELECTCONCAT (SELECT, GROUP_CONCAT (COLUMN_NAME), FROM, TABLE_NAME) tables. The table name is workerSELECTCONCAT (UPDATEworkerSET, GROUP_CONCAT (COLUMN_NAME, (), WHERE
This SQL statement runs in mysql without
Reprinted on the Internet and configured the auto-increment column. A primary key without a database table is generally set as an auto-increment field. After a record is inserted, how to obtain the ID value of the record: Use the following function:
No data with the same field values in a table # selectp1.citynamefromforecastp1, forecastp2wherep1. citynamep2.citynameandp1. citynamep2.citameynandp1. id! P2.id;
Query data with the same field values in a table. None # query data with the same
Use the function to generate id-bit auto-increment sequence number rules for custom Oracleselectid, Q | to_char (sysdate, yymmdd) | substr (00000,0, 5-length (id )) | idfromsys_admintorderbyid;
Use the function to generate id-bit auto-increment
No details. No SQL Server user-defined functions are limited. One of them is that uncertain functions cannot be used. This includes getdate (). If you have to get getdate () in the function, you can define a view createviewv_getdateasselectgetdate ()
Obtain how many hours are different between two time periods, or modify the number of days, hours, minutes, and seconds... None
Obtain how many hours are different between two time periods, or modify the number of days, hours, minutes, and seconds...
Trigger that automatically updates date columns with values of Max date without CREATETRIGGERautosettimeasmaxONdbo. statusafterINSERT, UPDATEASUPDATEdbo. statusSETmytime9999-12-3123: 59: 59.000 WHEREidIN (SELECTidFROMinserted)
TRIGGER without create
I suddenly found that DENSE_RANK is a good function. I used to think that FIRST_VALUE and LAST_VALUE can be replaced, but it is not. Sometimes it can be used by everyone. DENSE_RANK Function Description: calculates the relative positions of each row
There is an existing users table, as shown below: NAMEVALUEID -------------------------- A a1 B b2 C c3 Ding d4 now, they need to be combined in pairs, for example, AB and ba are the same, now we need to use the select statement to query all the
The following example captures the data returned from the OUTPUT clause of the MERGE statement and inserts the data into another table. The MERGE statement updates the Quantity column of the ProductInventory table based on the order processed in the
The stored procedure of SQL statement copying does not have USEmastergoIFEXISTS (SELECT * FROMdbo. sysobjectsWHEREidObject_id (N [dbo]. [sp_copyProce]) ANDObjectproperty (id, NIsProcedure) 1) DROPPROCEDURE [dbo]. [sp_copyProce]
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