Minimum Public multiple

DECLARE @ num1BIGINT, @ num2BIGINTSET @ num16SET @ num28DECLARE @ resultBIGINTDECLARE @ maxINTDECLARE @ timesINTIF @ num1 @ num2SET @ max @ num2ELSESET @ max @ num1SET @ times @ maxWHILE (@ times @ max) DECLARE @ num1 BIGINT, @ num2 bigint set @ num1

The number of digits in which the SQL statement returns a positive value.

No selectfloor (log10 (99.99) + 1 The number of digits with positive numbers does not have select floor (log10 (99.99) + 1 Number of digits with positive numbers --> $velocityCount--> --> select floor(log10(99.99))+1

SQL returns the digits of positive decimal places.

No selectLEN (CAST (99.9999-floor (99.9999) ASVARCHAR)-2 No select LEN (CAST (99.9999-floor (99.9999) as varchar)-2 Number of digits with positive decimal places --> $velocityCount--> --> select LEN(CAST((99.9999-floor(99.9999)) AS

View which objects are locked

Oracle database does not have 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. osuserFROMv $ sessions,

Obtain the IP address of the client connection in SQLServer

No details SQLServerCREATEFUNCTION [dbo]. [GetCurrentIP] () RETURNSvarchar (255) ASBEGINDECLARE @ IP_Addressvarchar (255); SELECT@IP_Addressclient_net_addressFROMsys.dm _ blank @ SPID; Return @ IP_Address; EN No details about SQL Server CREATE

Page PV storage process by year, month, day, And hour

Requirement: You need to make a statistical website that has video channels, image channels, and news channels, we can collect statistics on the number of visits to each resource in these channels for an hour, day, week, month, or year, access

Convert the field names of tables to strings separated by commas (,).

Convert all fields in the table into fields 1, 2, and 3, which are used in the middle. They are not tested in other databases of sql2008 without selectreplace (replace (stuff (Select ,, nameFromSysColumnsWhere table name) andnamenotin (Id)

SQLServer prohibit/Revoke all constraints from applying to Data Tables

SQLServer prohibit applying all constraints to the data table SQLServerALTERTABLEtb1NOCHECKCONSTRAINTALLGOALTERTABLEtb1CHECKCONSTRAINTALLGO SQL Server disables/removes all constraints and applies them to the data table SQL Server ALTER TABLE

Returns the reverse order of an integer.

No DECLARE @ INPUTBIGINT, @ RESULTBIGINTSET @ INPUT1234SET @ RESULT0while @ INPUT0BEGINSET @ RESULT * 10 + @ INPUT % 10SET @ INPUT @ INPUT10ENDSELECT @ RESULT No DECLARE @ input bigint, @ result bigintset @ INPUT = 1234 SET @ RESULT = 0 while @

You can switch the table name sqlserver Stored Procedure

Original article address: Skip without passing the table name in (procName @ Tablemaster) CREATEprocprocName @ Tablevarchar (50) asdeclare @ SqlStringvarchar (2000) set @ SqlStringselect * form + @ Tableexec (@ SqlString) you can also

Query the size of the SQL Server tablespace to see which tables occupy space

From: blog. csdn. nethtl258articledetails4029767 no droptable ## goexecsp_MSForEachTable @ precommandNcreatetable # (table name sysname, number of records int, reserved space Nvarchar (10), used space varchar (10 ), the index uses varchar (10), but

Sqlntext replacement Stored Procedure

Replace ntext field of sqlserver database ntext Stored Procedure replace ntext field of sqlserver database createprocedurereplace_ntext @ table_namenvarchar (100), -- target table name @ field_namenvarchar (100 ), -- target field name @

Oracle ORA-01653 error Solution

Solution: 1. enable the tablespace Extension function. 2. increase the space of the tablespace. 3. add data files to the tablespace; Oracle ---- query table space usage --- SELECTUPPER (F. TABLESPACE_NAME) tablespace name, D. TOT_GROOTTE_MB

MySQL obtains the actual size of the database.

Using an SQL statement, you can know how much space your database occupies without SELECTCONCAT (sum (ROUND (DATA_LENGTH + INDEX_LENGTH) Using an SQL statement, you can know how much space your database occupies without SELECTCONCAT (sum (ROUND

Mysql export csv

No detailed content: mysqlcsvselecta, B, cfrommy_table1_outfileca.csv FIELDSTERMINATEDBY; LINESTERMINATEDBYn; No details about MySQL csv select a, B, c FROM my_table INTO OUTFILE '/ca.csv' FIELDS TERMINATED BY '; 'Lines TERMINATED BY' \ n ';

SQLServer20 most common time formats

SQLServer uses the following function to convert the format of the date type: SELECTCONVERT (VARCHAR (20), GETDATE (), 108). The meaning of the last value is shown in: Time Format SQLServer SQL Server uses the following function to CONVERT the

Sqlite3C ++ Standard Code

It is suitable for embedded platform database construction, open source, simple and practical code, and easy to transplant! Sqlite3SQLite It is suitable for embedded platform database construction, open source, simple and practical code, and easy to

Get the first letter of a Chinese name

Used to obtain the first letter of the Chinese name: pinyin (@ strvarchar (500) RETURNSvarchar (500) AS * ----------------- used to obtain the first letter of the Chinese name * BEGINDeclare @ strlenint, @ returnvarchar (5 Used to obtain the first

The sqlplus setting of oracle displays the number of rows and columns

The number of rows and columns displayed by sqlplus in oracle sqlplusOracle displays the current number of displayed items (14 by default): showpagesize; set the number of displayed items to 100 hops: setpagesize100; display the current number of

Obtain the number of days of the input month in SQL.

Use OraclePLSQL without selectlpad (rownum, 201002) ymdfromdualconnectbyrownum (SELECTadd_months (trunc (to_date (, yyyymm), mm), 1) Use Oracle PL/SQL without select lpad (rownum, 2, 0) ymd from dualconnect by rownum = (SELECT add_months (trunc

Total Pages: 12780 1 .... 10786 10787 10788 10789 10790 .... 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.