Oracle10G view all table names and number of table records under the current user

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

Batch insert data in the database

Batch insert data records (resource_id, store_code, store_name, store_type, is_stop, address, tel, mobile, emp_code, financial_staff, is_dealers) selectsys_guid (), CK-| to_char (rownum ), test repository | to_char (rownum), computer storage

View table Field Information

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.

SQLwithrollup, withcube, and grouping statistical functions

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 functions

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,

Obtain the table's primarykey

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.

Recursive query of the WITH clause

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

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 --

An update exists during data import, and an insertion does not exist.

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?

Table variable instead of temporary table

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;

Determines whether a date is the end of a month.

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

Query the stored procedure and function of the required string

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)

SQL sets the maximum number of SQLServer connections

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

Delete all stored procedures

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

Group by user ID, retain the latest 1000 data records of the user, more than 1000 data records

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

Configure and use SQLmail

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

MySQL Stored Procedure Implementation split

MySQL Stored procedure Implementation; CREATEPROCEDURE 'Procedure _ split '(inputstringvarchar (1000), delimchar (1) begindeclarestrlenintDEFAULTlength (inputstring); declarelast_indexintDEFAULT0; decia MySQL Stored PROCEDURE Implementation split

Query indexes that have never been used

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_

Restrict frequent Website access

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

Lists all fields in a specified table.

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

Total Pages: 12780 1 .... 10783 10784 10785 10786 10787 .... 12780 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.