rand  reserved_pages

Chapter 2: Transact-SQL Functions

replicate

Description

Returns a string consisting of the specified expression repeated a given number of times.

Syntax

replicate (char_expr | uchar_expr, integer_expr)

Parameters

char_expr

is a character-type column name, variable, or constant expression of char, varchar, nchar, or nvarchar type.

uchar_expr

is a character-type column name, variable, or constant expression of unichar or univarchar type.

integer_expr

is any integer (tinyint, smallint, or int) column name, variable, or constant expression.

Examples

Example 1

select replicate("abcd", 3)
------------ 
abcdabcdabcd

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute replicate.

See also

Function stuff





Copyright © 2005. Sybase Inc. All rights reserved. reserved_pages

View this book as PDF