![]() | ![]() |
Home |
|
|
Reference Manual All Volumes (Online Only) |
|
| About This Book |
The Adaptive Server Reference Manual is a guide to Sybase(R) Adaptive Server(TM) and the Transact-SQL(R) language. This book includes information about Transact-SQL commands, built-in functions, procedures, datatypes, the system tables, expressions and identifiers, SQLSTATE errors, and reserved words.
The Adaptive Server Reference Manual is intended as a reference tool for Transact-SQL users of all levels. It provides basic syntax and usage information for every command, function, system procedure, catalog stored procedure, and extended stored procedure.
This manual consists of the following chapters:
The following documents comprise the Sybase Adaptive Server Enterprise documentation:
A more recent version of the Release Bulletin may be available on the World Wide Web. To check for critical product or document information that was added after the release of the product CD, use SyBooks(TM)-on-the-Web.
Use the SyBooks(TM) and SyBooks-on-the-Web online resources to learn more about your product:
Refer to Installing SyBooks in your documentation package for instructions on installing and starting SyBooks.
To use SyBooks-on-the-Web, go to http://www.sybase.com, and choose Documentation.
SQL is a free-form language: there are no rules about the number of words you can put on a line or where you must break a line. However, for readability, all examples and syntax statements in this manual are formatted so that each clause of a statement begins on a new line. Clauses that have more than one part extend to additional lines, which are indented.
The conventions for syntax statements in this manual are as follows:
Key | Definition |
|---|---|
command | Command names, command option names, utility names, utility flags, and other keywords are in bold Courier in syntax statements and in bold Helvetica in paragraph text. |
variable | Variables, or words that stand for values that you fill in, are in italics. |
{ } | Curly braces indicate that you choose at least one of the enclosed options. Do not include braces in your option. |
[ ] | Brackets mean choosing one or more of the enclosed options is optional. Do not include brackets in your option. |
( ) | Parentheses are to be typed as part of the command. |
| | The vertical bar means you may select only one of the options shown. |
, | The comma means you may choose as many of the options shown as you like, separating your choices with commas to be typed as part of the command. |
sp_dropdevice [device_name]
or, for a command with more options:
select column_name
from table_name
where search_conditions
In syntax statements, keywords (commands) are in normal font and identifiers are in lowercase: normal font for keywords, italics for user-supplied words.
select * from publishers
pub_id pub_name city state
------- ------------------- ----------- -----
0736 New Age Books Boston MA
0877 Binnet & Hardley Washington DC
1389 Algodata Infosystems Berkeley CA
(3 rows affected)
In this manual, most of the examples are in lowercase. However, you can disregard case when typing Transact-SQL keywords. For example, SELECT, Select, and select are the same.
Note that Adaptive Server's sensitivity to the case of database objects, such as table names, depends on the sort order installed on Adaptive Server. You can change case sensitivity for single-byte character sets by reconfiguring the Adaptive Server sort order. See "Changing the Default Character Set, Sort Order, or Language" in Chapter 13, "Configuring Character Sets, Sort Orders, and Languages" in the System Administration Guide for more information.
{die_on_your_feet | live_on_your_knees |
live_on_your_feet}{cash, check, credit}[anchovies]
[beans | rice | sweet_potatoes]
[extra_cheese, avocados, sour_cream]
An ellipsis (...) means that you can repeat the last unit as many times as you like. In this syntax statement, buy is a required keyword:
buy thing = price [cash | check | credit]
[, thing = price [cash | check | credit] ]...
You must buy at least one thing and give its price. You may choose a method of payment: one of the items enclosed in square brackets. You may also choose to buy additional things: as many of them as you like. For each thing you buy, give its name, its price, and (optionally) a method of payment.
Adaptive Server syntax statements use several different types of expressions.
Usage | Definition |
|---|---|
expression | Can include constants, literals, functions, column identifiers, variables or parameters |
logical expression | An expression that returns TRUE, FALSE or UNKNOWN |
constant expression | An expression that always returns the same value, such as "5+3" or "ABCDE" |
float_expr | Any floating-point expression or expression that implicitly converts to a floating value |
integer_expr | Any integer expression, or an expression that implicitly converts to an integer value |
numeric_expr | Any numeric expression that returns a single value |
char_expr | Any expression that returns a single character-type value |
binary_expression | An expression that returns a single binary or varbinary value |
Each Sybase installation that has purchased a support contract has one or more designated people who are authorized to contact Sybase Technical Support. If you cannot resolve a problem using the manuals or online help, please have the designated person contact Sybase Technical Support or the Sybase subsidiary in your area.
|
|