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
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;
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
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-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,
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
Recently handle an OracleGridinfrastructure (GI) installation problem, failed during the execution of root. sh, and displays the following error: DiskGroupOCRcreationfailedwiththefollowingmessage: ORA-15018:
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
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
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 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
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
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 with the table field content declare @ tvarchar (255), @ cvarchar (255) values, B. namefromsysobjectsa, syscolumnsb, policypescwherea. uandc
Replace some content of all
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 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 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_lock2Version: SQLServer7.02000Createdby: Alexander chigrikwww.mssqlcity.com
Transaction Processing Mechanism in SQL sp_lock2Version: SQL Server 7.0/2000 Created by: Alexander Chigrikhttp: //
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