No SELECTt is used to obtain cluster index information in the SQLServer database. name [Table name], ix. name [Cluster Index name], c. name [clustering index includes fields] fromsys. indexesixINNERJOINsys. tablestONix.
We need to split a data column when doing the requirement and check the code on the Internet. Unfortunately, it is not easy to use. Simply write a demo by yourself. SELECTsubstring (columnname, 0, CHARINDEX (, a) asfirststr, substring (columnname,
No details. No ALTERTABLEtb_nameMODIFYcolumn_nameVARCHAR2 (200 );
No details. No alter table tb_name MODIFY column_name VARCHAR2 (200 );
-->
$velocityCount-->
-->
ALTER TABLE tb_name MODIFY column_name VARCHAR2(200);
If no details are found, MySQLSELECTabc0 returns 1 when writing WHERE. Do not compare the varchar field with 0.
No details MySQL SELECT 'abc' = 0 returns 1 when writing WHERE. Do not compare the varchar field with 0.
MySQL
-->
Multi-condition sorting without select * fromi_musicwheresorderbyscorenumasc, datelineasc
Multi-condition sorting without select * from I _music where sid = '$ sid' order by scorenum asc, dateline asc
Multi-condition sorting
-->
$velocityCount-
SQL multi-Keyword Search without if (count ($ newstr) 1) {if the number of elements in the array is 1, query $ sqlselect * fromtb_infowheretitlelike % according to a single condition. $ newstr [0]. % orcontentlike %. $ newstr [0]. % orderbyiddesc;}
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;
Today, I have a requirement to count all the table names and records of the current user. I have found a lot on the Internet, but I am not sharing it with you today... Methods that can be implemented. Oracle1. Run createorreplacefunctioncount_rows
No selectc. colid, c. name, c. xtype, c. length, xprecfromsyscolumnscinnerjoinsysobjectsoono. INVMAorderbycolid is displayed.
No select c. colid, c. name, c. xtype, c. length, xprecfrom syscolumns cinner join sysobjects o on o. id = c. idwhere o.
Mysql string function usage MySQL marks the first position as 1 for operations on string positions. 1. ASCII (str) returns the ASCII code value of the leftmost character of the str string. If str is a Null String, 0 is returned. If 'str' is NULL,
Delete plan cache SQLServer -- delete the plan cache DBCC of the entire database? FREEPROCCACHE -- delete a database's plan cache USE? MasterDECLARE? @ Dbid? INTSELECT? @ Db table name DBCC? FLUSHPROCINDB? (@ Dbid)
Delete plan cache SQL Server --
When data is imported, there are updates. If no data is inserted, there is no CREATE? Trigger? Tr_bank3? ON? Bank3AFTER? INSERTAS ?????? Update? Bank1? Set? Bank1.fmoneybank1. fmoney + c. ??????? From ????????? (Select? Fid, sum (case? When? TYPE0?
No declare @ ttable (idintidentity, colvarchar (4) declare @ sqlvarchar (60) for variables similar to temporary tables) set @ SQL Lu Bu Zhao Yun Ma Chao Dian Wei Guan Yu Zhang Fei XU Yu Huang Zhongyan Yan Liang Wen ugly pound sun ce declare @ iint;
Determine whether a date is the end of the month without DECLARE @ DtDATETIMESET @ Dt2011-06-30IFMONTH (@ Dt )! MONTH (DATEADD (DAY, 1, @ Dt) PRINTEndOfMonth
Determine whether a date is the end of a MONTH without DECLARE @ Dt datetime set @ Dt = '201
No CREATEPROCEDURE [dbo] is available for the stored procedure and function where the required string is located. [StringSearchInSQLObject] @ TextToSearchVARCHAR (2000) ASSELECTDISTINCTOBJECT_NAME (SC. id) ASOBJECTNAME, USER_NAME (so. uid)
Database field: id, user_id, date ,... other fields: MySQLBEGIN # Routinebodygoeshere... * If you query more than 1000 entries, delete the statement * DECLAREact_friends_user_idINT; DECLAREact_friends_min_idINT; DECLAREdnINTdefault0; * define the
No selectobject_name (object_id), * sys. Equals (object_id) isnotnull
No select object_name (object_id), * sys. dm_db_index_usage_state where user_seeks = 0 and user_scans = 0 and user_lookups = 0 and system_seeks = 0 and system_scans = 0 and system_
In the evening, the younger brother yangyu said that he had a table with more than 90 fields, and all the fields should be listed. If you copy them one by one, it would be too much trouble, I wrote a small script. no * lists all fields in 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service