Find the same table with the same structure from other databases based on the primary key field and data field of a table, and synchronize the data of the same table. No USE [CMS2] GODECLARE @ sqlNVARCHAR (MAX) SET @ sqlNMERGE [dbo]. [RolePermission]
Calculate a period of vertex expiration date, but exclude the six-day mark, so that you can easily query the vertex without selectalldayfrom (selectto_date (, yyyy-mm-dd) + rownumalldayfrom (selectto_date, yyyy-mm-dd), to_date (2007-02-28,
By using the flexible use of the CHARINDEX, PATINDEX, and wildcard functions, we can determine that the method containing the sub-string in the string does not have source code and Demonstration: Source Code 1. query whether the string contains
There is no replicate between databases with the same structure. Schema_name (sst. schema_id) FROMsys. tablessstWHEREsst. TYPEUDECLARE @ nameVARCHAR (80), @ schemaVARCHAR (40) OPENNoCheckConstr
There is no use oldgoDECLARE NoCheckConstraintAll
1. SQL statement. insert is followed by 1000 values for one-time submission. 2. use the connection pool to keep the persistent connection inserted; 3. replace the storage engine of Mysql with Inforbright, convert the data into text, and import data
No details: MySQLaltertabletb_anniversaryconverttocharactersetutf8;
No details about MySQL alter table tb_anniversary convert to character set utf8;
MySQL
-->
$velocityCount-->
-->
alter table tb_anniversary convert to character set
List tables that are not recorded in the database. No WITHEmptyRowsAS (SELECTSUM (row_count) AS [TotalRows], OBJECT_NAME (OBJECT_ID) ASTableNameFROMsys. Tables) SELECT * FROMEmptyRowsWHERE [
List tables that are not recorded in the database. No WITH
* ** Filename: GetTableInfor. SQL * Description: used to obtain the field, length, Description, and other data information of the specified table in the specified database, so that the code generator can be developed later. Tbname can be changed to
No details OracleSQLDeveloper -- only copy the table structure createtablestudentTempasselect * Tables; -- the condition is false and no data is obtained -- copy existing table data to the new table insertintostudentTempselect * fromstudent;
No createtable # SomeTmpTbl (col1int, col2varchar (20), col3datetime) GOselect * fromtempdb. sys. columnswhereobject_idobject_id (tempdb .. # SomeTmpTbl) is obtained from the temporary table );
The names of the columns in the temporary table are not
When the data volume is large, you need to perform table sharding for the data table, such as number modulo and date table sharding: TABLE_0_20131001, TABLE_99_20131031 for the sake of portability, the database partition table feature is not allowed,
The t-sqlcompute function is currently only used in 2008 .. Others have tried withtb (id, product, barcode, qty) as (select1, AA, 240, 3unionallselect2, BB, 245, 2unionallselect3, AA, 255, 2unionallselect4, BB, 240,1) select * fromtbcomputesum (qty),
Ah, I will introduce it every time. What should I do? Well, the copyright is mine. I will repost it to explain the source. No CREATEORREPLACEPROCEDURESEND_MAIL_one (as_recpinvarchar2, -- mail recipient as_subjectinvarchar2, -- mail title
Everything is an object. Everything in the world is an object. We can use PLSQL to implement object-oriented functions, so that programs can have better performance and readability without CREATEORREPLACETYPEliao_opp_testASOBJECT (-- Author: HAND --
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