what is function in sql

Learn about what is function in sql, we have the largest and most updated what is function in sql information on alibabacloud.com

Introduction to the RAND function in SQL Server and implementation of interval random numerical function

    Tasks such as SQL Server simulation data generation and random padding of numeric column values such as Integer, date, and time data types are encountered in the work, and are used to random numbers in these tasks. In view of this, this article

The Replace function in SQL

REPLACEReplaces all occurrences of the second given string expression in the first string expression with a third expression.GrammarREPLACE ( ‘string_expression1‘ , ‘string_expression2‘ , ‘string_expression3‘ )Parameters' String_expression1 'The

Time format settings for the GETDATE () function in SQL Server

A very powerful date formatting function in SQL ServerSelect CONVERT (varchar), GETDATE (), 0): 2006 10:57amSelect CONVERT (varchar), GETDATE (), 1): 05/16/06Select CONVERT (varchar), GETDATE (), 2): 06.05.16Select CONVERT (varchar), GETDATE (), 3):

Usage of row_number,rank,dense_rank,ntile ranking function in SQL Server

1.row_number () is the line number2.rank: Similar to Row_number, except that it processes the order by field, and if the field value is the same, the line number remains unchanged3.dense_rank: Similar to rank, the difference is whether the row

The object_id () function in SQL SERVER

In SQL Server database , if the query database has the index of the specified name or foreign key constraints, etc., often use the object_id (' name ', ' type ') method, take notes as follows:?Syntax: object_id (' objectname ') or object ('

Several methods of implementing Split function in SQL

Example 1Code to copy code as followsCreate function F_split (@SourceSql varchar (8000), @StrSeprate varchar (10))Returns @temp table (a varchar (100))--function to realize split function--date:2003-10-14AsBeginDECLARE @i intSet @SourceSql =rtrim

the pivot () function in SQL Server implements dynamic row-to-column

In general, the pivot () function can only be written to die in, because pivot () in does not support subqueries, so this can only be solved with stored procedures;CREATE PROCEDURE Insurancepivot@Foldercode VARCHAR (50),@isY VARCHAR (4)AsBEGIN

The object_id () function in SQL SERVER

There is a system table sysobjects in the database, which stores information about each object in the database. Can be queried to see the results. You can see that each object has an ID that stores information about tables, stored procedures,

where 1=1 1=2 function in SQL statements

Write a 1=1 for the following conditions. This SQL should be spelled out in the program, the first thing in the program is not sure whether the following conditions are sure to have, in order to program simple first plus where 1=1, the back can be

How to use the ROW_NUMBER () sorting function in SQL

I have previously written an article to sort and mentioned the ROW_NUMBER () function. However, many people did not know the detailed usage of this function for the first time.MK is posted here for your reference:Three methods for Mssql to obtain

Several methods for implementing the SPLIT function in SQL

Example 1 The code is as follows:Copy code Create function f_split (@ SourceSql varchar (8000), @ StrSeprate varchar (10 ))Returns @ temp table (a varchar (100 ))-- Implement the split function-- Date: 2003-10-14AsBeginDeclare @ I intSet @

Time Processing dateadd function in SQL

DateaddReturns a new datetime value based on a specified date.SyntaxDateadd (datepart, number, date)ParametersDatepartIs a parameter that specifies which part of the date should be returned to the new value. The following table lists the date and

How can I simulate a cursor in a function in SQL SERVER?

If there is such a master-slave table, table 1 represents basic information, and table 2 represents extended information. For example, the master table represents the basic information of purchasers. To simplify the process, all the field names are

Use of the case function in SQL Server (Part 2) -- reprint

Next 4. Conditional SelectionUPDATE. For example, the following update conditions are available: For employees with a salary of more than 5000, the salary is reduced by 10%. Employees with salaries between 2000 and 4600 increase by 15% You can

Use of the isnull function in SQL-replace null with the specified replacement value

Isnull Replace null with the specified replacement value.Syntax Isnull(Check_Expression, Replacement_value)Parameters Check_expression Whether the expression is null is checked.Check_expressionIt can be of any

How to Use the XML function in SQL Server 2000 (1)

SQL Server 2000 provides some XML functions, which are used to convert the XML documents in the component layer of the relational row set through XML, read XML documents, and load data in batches. For example, you can pass an XML document to a

Decode () function in SQL

When I read other users' SQL statements today, I still see the decode () function. I have never touched it before. I checked it online. It is quite a useful function, write it down and hope it will help you!     Decode () function

Use of the Replace function in SQL Server

In the use of SQL, we occasionally encounter a situation, that is, the need to change the form of data storage, such as a database of a table (Info) has a field educational (education), previously stored in the JSON array, now because of changes in

Summary of several methods of implementing Split function in SQL (must see article) _mysql

Example 1 The code is as follows Create function F_split (@SourceSql varchar (8000), @StrSeprate varchar) returns @temp table (a varchar (100)) --function of the split function --date:2003-10-14 as begin Declare @i int set @SourceSql

Introduction to the Decode () function in SQL _mssql

The Decode function is a unique method of computing provided by Oracle's SQL software Oracle Pl/sql, known for its concise operations, controllable data models, and flexible format conversions. Look at other people's SQL today to see that there are

Total Pages: 15 1 .... 3 4 5 6 7 .... 15 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.