SQLServer add linked server

No details none -- enable AdHocDistributedQueries: execsp_configureshowadvancedoptions, exceptions, 1reconfigure -- disable AdHocDistributedQueries: execsp_configureAdHocDistributedQue No details none -- enable Ad Hoc Distributed Queries: exec

SQLServer database common date and time format conversion string

* ** Filename: sqlserver' is commonly used to convert a string from a string to a date format. * Description: a string of commonly used Date and Time formats in the SQLServer database. * Version: 1.0 * Created: 201 is commonly used during page

Data row and block information of the Oracle statistical table

The data rows and data blocks in the Oracle statistical table do not have selecttable_name, num_rows, blocksfromuser_tableswheretable_nameTestdb_file_multiblock_read_count The data rows and data blocks in the Oracle statistical table do not have

Object-Oriented Programming of PL/SQL

Everything is an object. Everything in the world is an object. We can use PLSQL to implement object-oriented functions, so that programs can have better performance and readability without CREATEORREPLACETYPEliao_opp_testASOBJECT (-- Author: HAND --

Oracle solves & quot; easy language problems & quot;

OracleselectT of Oracle10g or later versions. * from (selectRownumasA, 2 * RownumB, 3 * RownumCfromdualconnectbylevel999) TwhereT. a123ANDT. c999 -- borrow the regular expression andnotREGEXP_LIKE (TO_CHAR (A) | TO_CHAR (B) | TO_CHAR (C), 1. *? 1 | 2

T-SQL to solve & quot; easy language problems & quot;

Bored at work, written to play, do not know SQL-SERVER, please give pointers. No declare @ iintdeclare @ jintdeclare @ strvarchar (20) set @ i123while @ i9993beginselect @ strconvert (varchar, @ I) ++ convert (varchar, @ I * 2) ++ convert (varchar, @

Oracle uses sequence to increase

For the first time I learned to write the stored procedure, please give more comments and correct me. Thank you for your purpose: to insert NumInsert duplicate data from StartSerialNo to EndSerialNo to the table. The table only increments with the

ORACLE unlock table lock

No details about Oracle lock table and unlock SELECT * + rule * s. username, decode (l. type, TM, TABLELOCK, TX, ROWLOCK, NULL) LOCK_LEVEL, o. owner, o. object_name, o. object_type, s. sid, s. serial #, s. terminal, s. machine, s. program, s.

View the database cache SQL

None of the SQL statements cached by the database -- applicable to MSSQL2000 and MSSQL2005use? Masterdeclare? @ Dbid? IntSelect? @ Dbid ?? Dbid? From? Sysdatabases? Where? Name ?? Test -- change to the database name selectdbid, UseCounts ?,

Achieve Yang Hui triangle

It is written using stored procedures and temporary tables. It mainly refers to the result of the last select statement and is arranged in the desired triangle shape. Due to restrictions on BIGINT data, up to 67 layers can be displayed. Result id ---

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

Oracle converts Greenwich Mean Time to normal time

Example: Oracleto_char (trunc (B. starttime1000606024) + TO_DATE (1970-01-0100:00:00, yyyy-MM-ddhh24: mi: ss), yyyy-mm-dd) | lpad (mod (trunc (B. starttime10006060), 24), 2, 0) | |:| lpad (mod (trunc (B. starttime100060), 60),) | |:| | lp For

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

SQL retrieval time

No SELECTCONVERT (varchar (8), GetDate (), 8) SELECTCONVERT (varchar (8), GetDate (), 24) SELECTCONVERT (varchar (8 ), getDate (), 108) SELECTCONVERT (time, GetDate () SELECTCAST (GetDate () AStime) The SQL query time does not include SELECT CONVERT

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

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

Delete duplicate records in a table in SQL

No details none if the table is Mytableselectdistinct * frominto temporary table fromMyTabledeletefromMyTableinsertintoMyTableslect * from temporary table droptable temporary table No details none. If the table is Mytableselect distinct * from into

Add public execution permissions to stored procedures

Add public execution permission to stored procedures without GRANTEXEONSP_NAMETOPUBLIC Add PUBLIC execution permission for stored procedures without grant exe on SP_NAME TO PUBLIC Add public execution permissions to stored procedures -->

Simple MySQL Sequence

This is a simple sequential storage Program (a function) compiled for MySQL ). Before using the sequence, you must add a number to the sequence record table to initialize the sequence: INSERTINTOSequence (name ..., 0); then, you can use nextval

Bytes row-to-column and unbytes column-to-row

Distinct: Convert the unique value in a column of the expression to multiple columns in the output to rotate the table value expression, and aggregate any other column values required in the final output if necessary. Unregister and distinct perform

Total Pages: 12780 1 .... 11104 11105 11106 11107 11108 .... 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.