Update statistics of tables in the database

No IFEXISTS (SELECTnameFROMsys. databasesWHEREnameNTest) BEGINUSETestEXECsp_updatestatsENDGO No if exists (SELECT name FROM sys. databases WHERE name = N 'test') BEGINUSE TestEXEC sp_updatestatsENDGO Update statistics of tables in the database

Search for the table name field name based on the Value

If you know that a value exists in a field of a table, you can use the following SQL statement to find the table name and field name my. oschina. netjeffyublogOracleDECLAREvar_sqlVARCHAR2 (1000); var_valueVARCHAR2 (100): value to be queried;

Use table functions to cut strings

No details no response (100); createorreplacefunctionget_userid_tab (v_strinvarchar2) Response (4000); beginifnvl (v_str, null) isnotnullthenv No details no create or replace type table_userid is table of varchar2 (100); create or replace function

Query all descendants of a person in a mysql family table

We often place some tree structures in a table, such as genealogy and menus. The biggest problem with this type of table is that when we need to query all the sub-records of a certain record, it is difficult to use a simple SQL statement. We can

MySQLStudy-Use of graphical tools in MySQL (phpMyAdmin)

MySQLStudy-MySQL-type tool usage (phpMyAdmin) system environment: RedHatEL6 Database: MySQL5.6.4-m7phpMyAdmin is a software tool written in PHP and is based on PHP, mySQL database management tools based on Web-Base architecture on website hosts,

ASM heartbeats detection-DelayedASMPSTheartbeats

Recently, the problem that the ASM disk dismount is continuously received and the error "Waited15secsforwriteIOtoPST" is reported. This is the unique heartbeat timeout detection of ASM. ASMinstance regularly checks whether each asmdisk can be

When root. sh meets ORA-15031

Recently handle an OracleGridinfrastructure (GI) installation problem, failed during the execution of root. sh, and displays the following error: DiskGroupOCRcreationfailedwiththefollowingmessage: ORA-15018:

Details about the security mechanism of MySQL

As a system database, MySQL has high security requirements. If the database of a system is illegal to access or eavesdrop, the data of the system will be seriously threatened. Otherwise, the data and password will be stolen, and the system will be

Can 'tconnecttolocalmysqlserverthroughsocket problem solved

After mysql is installed in Linux5.6, run the mysql command to report the following error: ERROR2002 (HY000): Can After mysql is installed on the Linux 2002 system, run the mysql command to report the following ERROR: ERROR (HY000): Can The

SQLitevsMySQLvsPostgreSQL: database comparison

Since the introduction of the relational database model in 1970, the relational database began to emerge. After more than 40 years of evolution, today's relational databases are widely used in a wide range of features. Facing so many relational

Delete all objects under the current oracle user

Delete the object oracle --. SQL script-the only note is the following f: dropobj. SQL is the operation. SQL; -- your computer does not have a drive F, please replace it with D or E another drive letter -- used to delete all objects of the current

Table creation constraints for financial year tables

Financial year Table constraints without createtable1_alyear (hour, start_dateDATENOTNULL, CHECK (EXTRACT (week) fiscal_year-1) AND (EXTRACT (MONTHFROMstart_date) 10) AND (EXTRACT (DAYFROMstart_date) 1 ), Financial YEAR Table constraints do NOT

Create Table primary key constraints

No CREATETabletb_1 (colINTPRIMARYKEY) GO CREATE Table tb_1 (col int primary key) GO Create Table primary key constraints --> $velocityCount--> --> CREATE Table tb_1(col INT PRIMARY KEY)GO

Replace an SQL statement with carriage return or line feed in the field

Cancel or replace the carriage return line break to keep the data clean. -- replace the carriage return UPDATEtable_nameSETfield_nameREPLACE (field_name, CHR (13),) WHEREINSTR (field_name, CHR (13) 0 -- replace the line feed Handler, CHR (10),)

Replace some content of all fields in all tables in the SQLServer database-method 2

Replace some content of all fields in all tables in the SQLServer database with the table field content declare @ tvarchar (255), @ cvarchar (255) values, B. namefromsysobjectsa, syscolumnsb, policypescwherea. uandc Replace some content of all

MySQL finds records containing non-ASCII character values

For example, to find some records that contain Chinese characters, use the MySQL Regular Expression query condition AsciiMySQLSELECT * FROMmy_tableWHERENOTHEX (my_column) REGEXP ^ ([0-7] [0-9A-F]) * $; -- On the contrary, find the record that only

SQL export to Word

SQL export to WordWordVersion: SQLServer7.02000Createdby: Alexander chigrikwww.mssqlcity.com SQL export to Word Version: SQL Server 7.0/2000 Created by: Alexander Chigrikhttp: // www.MSSQLCity.com/-all about ms SQL (SQL Server Articles, FAQ, Scripts,

Enumerate the Agent in SQL

Enumerate the Agent Agentusemsdbgoifexists (select * fromsysobjectswherenameNsp_sqlagent_enum_errorlogsandtypeP) dropprocdbo. Counter @ Enumerate the Agent in SQL use msdbgoif exists (select * from sysobjects where name = n'sp _

Transaction Processing Mechanism in SQL -- sp_lock2

Transaction Processing Mechanism in SQL sp_lock2Version: SQLServer7.02000Createdby: Alexander chigrikwww.mssqlcity.com Transaction Processing Mechanism in SQL sp_lock2Version: SQL Server 7.0/2000 Created by: Alexander Chigrikhttp: //

Stored Procedure for removing keys

Foreign key stored procedure createproceprdropforeignkeys @ chvreferencedtablevarchar (30) asdeclare @ alias (30), @ chvforeignkeyvarchar (30), @ chvsqlvarchar (255) alias. name, fk. namef Create proce prdropforeignkeys @ chvreferencedtable varchar (

Total Pages: 12780 1 .... 3624 3625 3626 3627 3628 .... 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.