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.
The difference between withrollup, withcube, groupingCUBE, and ROLLUP is that the result set generated by the CUBE displays the aggregation of all the combinations of the values in the selected column. The result set generated by ROLLUP displays the
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,
Retrieving the primarykey of the SQLServer table without SELECTcu. Distinct
Obtain the primary key of the SQL Server table. No SELECT cu. Column_NameFROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS t LEFT JOIN capacity cu ON t. CONSTRAINT_NAME = cu.
No WITHRPLAS (SELECTFId, FNumber, FName, signature) SELECTFId, FNumber, FName, FManagerIdFROMRPLWITHRPL (FId, FNumber, FName, FManagerId) AS (SELECTFOOT. FId, ROOT. FNumber, ROOT. FName, RO
Recursive queries WITH clauses do NOT have with rpl as
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)
Set the T-SQL statement under the maximum number of connections to configure the maximum number of concurrent user connections allowed by SQLServer. No execsp_configureshowadvancedoptions, 1execsp_configureuserconnections, the first sentence of 100
No DECLARE @ procNameVARCHAR (500) DECLAREcurCURSORFORSELECT [name] FROMsys. Tables @ procNameWHILE @ fetch_status0BEGINEXEC (dropprocedure + @ procName) FE is deleted for all stored procedures.
No DECLARE @ procName VARCHAR (500) DECLARE cur cursor
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
SQL Server provides an extended storage process for sending and receiving mails through EXCHANGE or OUTLOOK. The following describes these procedures. No xp_startmail @ user, @ password -- @ user and @ password are optional -- You can also open Sup
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_
Execution of the stored procedure procAccessIP (@ ip, @ seconds, @ maxTimes) returns 0 or 1. If procAccessIP (127.0.0.1, 5, 5) is set, if the access to this stored procedure exceeds 5 times within 5 seconds, 1 is returned, otherwise 0 is returned
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