sql.doc and queries

Upload: kartiknirwan

Post on 04-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 SQL.doc and queries

    1/12

    SQL DML and DDL

    SQL can be divided into two parts: The Data Manipulation Language (DML)and the Data Definition Language (DDL).

    The quer and update co!!ands for! the DML part of SQL:

    SELECT" e#tracts data fro! a database UPDATE" updates data in a database DELETE" deletes data fro! a database INSERT INTO" inserts new data into a database

    The DDL part of SQL per!its database tables to be created or deleted. $t alsodefines inde#es (%es)& specifies lin%s between tables& and i!posesconstraints between tables. The !ost i!portant DDL state!ents in SQL are:

    CREATE DATABASE" creates a new database

    ALTER DATABASE" !odifies a database CREATE TABLE" creates a new table ALTER TABLE" !odifies a table DROP TABLE" deletes a table CREATE INDEX" creates an inde# (search %e) DROP INDEX" deletes an inde#

    Oracle Built in Functions

    There are two tpes of functions in 'racle.! Sin"le Ro# Functions$Single row or Scalar functions return a value forever row that is processed in a quer.%! &rou' Functions$These functions group the rows of data based on thevalues returned b the quer. This is discussed in SQL '*+ ,unctions. Thegroup functions are used to calculate aggregate values li%e total or average&which return -ust one total or one average value after processing a group ofrows.

    here are four tpes of single row functions. The are:! Nu(eric Functions$These are functions that accept nu!eric input andreturn nu!eric values.

    %! C)aracter or Te*t Functions$These are functions that accept characterinput and can return both character and nu!ber values.+! Date Functions$These are functions that ta%e values that are ofdatatpe DT/ as input and return values of datatpe DT/& e#cept for theM'0T1S23/T4//0 function& which returns a nu!ber.,! Con-ersion Functions$These are functions that help us to convert avalue in one for! to another for!. ,or /#a!ple: a null value into an actualvalue& or a value fro! one datatpe to another datatpe li%e 05L& T'261&T'20*M3/& T'2DT/ etc.

    1

  • 8/14/2019 SQL.doc and queries

    2/12

    7ou can co!bine !ore than one function together in an e#pression. This is%nown as nesting of functions.

    .)at is a DUAL Ta/le in Oracle0This is a single row and single colu!n du!! table provided b oracle. Thisis used to perfor! !athe!atical calculations without using a table.

    Select 8 fro! D*L

    Out'ut$

    D*MM7"""""""9

    Select 8 ;;; fro! Dual

    Out'ut$

    8 ;;;"""""""""x>

    6/$L (#)$nteger value that is reater than or equal to the nu!ber>x>

    ,L'' (#) $nteger value that is Less than or equal to the nu!ber >x>

    T*06 (#&)

    Truncates value of nu!ber >x> up to >y> deci!al places

    '*0D (#&)

    ounded off value of the nu!ber >x> up to the nu!ber >y>deci!al places

    The following e#a!ples e#plains the usage of the above nu!eric functions

    FunctionNa(e

    E*a('lesReturn1alue

    3S (#)3S (?)3S ("?)

    ?"?

    6/$L (#) 6/$L (@.;A)6/$L (@.B=)

    AA

    2

  • 8/14/2019 SQL.doc and queries

    3/12

    6/$L ("?.m'position.

    L/0T1 0u!ber of characters in 'string_value'in returned.

    3

  • 8/14/2019 SQL.doc and queries

    4/12

    (string2value)

    L+D (string2value&n& pad2value)

    eturns >string_value'left"padded with 'pad_value'. Thelength of the whole string will be of 'n' characters.

    +D (string2value&n& pad2value)

    eturns >string_value'right"padded with 'pad_value'.The length of the whole string will be of 'n' characters.

    ,or /#a!ple& we can use the above *++/() te#t function with the colu!nvalue as follows.

    S/L/6T *++/ (product2na!e) ,'M productE

    The following e#a!ples e#plains the usage of the above character or te#tfunctions

    Function Na(e E*a('lesReturn1alue

    L'4/(string2value) L'4/(>ood Morning>) good !orning

    *++/(string2value) *++/(>ood Morning>) ''DM'0$0

    $0$T6+(string2value) $0$T6+(>''D M'0$0>) ood Morning

    LT$M(string2value&tri!2te#t)

    LT$M (>ood Morning>&>ood)

    Morning

    T$M (string2value&tri!2te#t)

    T$M (>ood Morning>& >Morning>)

    ood

    T$M (tri!2te#t ,'Mstring2value)

    T$M (>o> ,'M >oodMorning>)

    d Mrning

    S*3ST (string2value& !& n)S*3ST (>ood Morning>& ood Morning>) ?@L+D (string2value& n&pad2value)

    L+D (>ood>& 8>) 88ood

    +D (string2value& n&pad2value)

    +D (>ood>& 8>) ood88

    +! Date Functions$

    These are functions that ta%e values that are of datatpe DT/ as input andreturn values of datatpes DT/& e#cept for the M'0T1S23/T4//0 function&which returns a nu!ber as output.

    ,ew date functions are as given below.

    Function Na(e Return 1alue

    DD2M'0T1S(date& n)

    eturns a date value after adding 'n'!onths to the date'x'.

    M'0T1S23/T4//0(#?& #@)

    eturns the nu!ber of !onths between dates #? and #@.

    4

  • 8/14/2019 SQL.doc and queries

    5/12

    '*0D (#&date2for!at)

    eturns the date 'x'rounded off to the nearest centur&ear& !onth& date& hour& !inute& or second as specifiedb the 'date_format'.

    T*06 (#&date2for!at)

    eturns the date 'x'lesser than or equal to the nearestcentur& ear& !onth& date& hour& !inute& or second asspecified b the >date2for!at>.

    0/9T2D7 (#&wee%2da)

    eturns the ne#t date of the 'week_day'on or after thedate 'x'occurs.

    LST2D7 (#)$t is used to deter!ine the nu!ber of das re!aining in a!onth fro! the date 'x'specified.

    S7SDT/ eturns the sste!s current date and ti!e.

    0/42T$M/ (#&Fone?& Fone@)

    eturns the date and ti!e in Fone@ if date >#> representsthe ti!e in Fone?.

    The below table provides the e#a!ples for the above functions

    Function Na(e E*a('les

    Return

    1alueDD2M'0T1S ( ) DD2M'0T1S (>?& A) ??& >?)

    A

    0/9T2D7( ) 0/9T2D7 (>?"Gun";>& >4ednesda>) B"G*0";

    LST2D7( ) LST2D7 (>?"Gun";>) A"Gun";

    0/42T$M/( ) 0/42T$M/ (>?"Gun";>& >$ST>& >/ST>) A?"Ma";

    ,! Con-ersion Functions$

    These are functions that help us to convert a value in one for! to another

    for!. ,or /#: a null value into an actual value& or a value fro! one datatpeto another datatpe li%e 05L& T'261& T'20*M3/& T'2DT/.

    ,ew of the conversion functions available in oracle are:

    Function Na(e Return 1alue

    T'261 (# H&I)6onverts 0u!eric and Date values to a character stringvalue. $t cannot be used for calculations since it is astring value.

    T'2DT/ (# H&date2for!atI)

    6onverts a valid 0u!eric and 6haracter values to a Datevalue. Date is for!atted to the for!at specified b

    'date_format'.05L (#& )

    $f 'x'is 0*LL& replace it with 'y'. 'x'and 'y'!ust be of thesa!e datatpe.

    D/6'D/ (a& b& c& d&e& default2value)

    6hec%s the value of 'a'& if a = b& then returns 'c'. $f a = d&then returns 'e'. /lse& returns default_value.

    The below table provides the e#a!ples for the above functions

    5

  • 8/14/2019 SQL.doc and queries

    6/12

  • 8/14/2019 SQL.doc and queries

    7/12

    p% 3S/ T3L/ $nnoD3 loop 3S/ T3L/ M$SM %urs 3S/ T3L/ M$SM % 3S/ T3L/ M$SM into 3S/ T3L/ M$SM goto 3S/ T3L/ M$SM

    f%@ 3S/ T3L/ $nnoD3 f% 3S/ T3L/ $nnoD3 """"""""""""""""""""""""""""""""? rows in set (.? sec)

    /#planation: The state!ent requests a list of all the tables in database dbC&in reverse alphabetic order& showing -ust three pieces of infor!ation: thena!e of the table& its tpe& and its storage engine.

    The definition for character colu!ns (for e#a!ple& T3L/S.T3L/20M/) isgenerall 561(N) 616T/ S/T utf; where Nis at least 6it>

    41// T3L/20M/ 6'LLT/ utf;2general2ci P >cit>41// *++/(T3L/20M/) P >6$T7>41// L'4/(T3L/20M/) P >cit>

    /ach MSQL user has the right to access these tables& but can see onl therows in the tables that correspond to ob-ects for which the user has theproper access privileges. $n so!e cases (for e#a!ple& the'*T$0/2D/,$0$T$'0 colu!n in the $0,'MT$'02S61/M.'*T$0/Stable)&users who have insufficient privileges will see 0*LL.

    The S/L/6T ... ,'M $0,'MT$'02S61/M state!ent is intended as a!ore consistent wa to provide access to the infor!ation provided b the

    various S1'4state!ents that MSQL supports (S1'4 DT3S/S& S1'4T3L/S& and so forth). *sing S/L/6Thas these advantages& co!pared toS1'4:

    $t confor!s to 6odd>s rules. That is& all access is done on tables. 0obod needs to learn a new state!ent snta#. 3ecause the alread

    %now how S/L/6Twor%s& the onl need to learn the ob-ect na!es.

    7

    http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.htmlhttp://dev.mysql.com/doc/refman/5.0/en/charset-collate.htmlhttp://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_upperhttp://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_lowerhttp://dev.mysql.com/doc/refman/5.0/en/routines-table.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show-databases.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show-tables.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show-tables.htmlhttp://dev.mysql.com/doc/refman/5.0/en/select.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/select.htmlhttp://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.htmlhttp://dev.mysql.com/doc/refman/5.0/en/charset-collate.htmlhttp://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_upperhttp://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_lowerhttp://dev.mysql.com/doc/refman/5.0/en/routines-table.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show-databases.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show-tables.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show-tables.htmlhttp://dev.mysql.com/doc/refman/5.0/en/select.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/select.html
  • 8/14/2019 SQL.doc and queries

    8/12

    The i!ple!entor need not worr about adding %ewords.

    There are !illions of possible output variations& instead of -ust one.This provides !ore fle#ibilit for applications that have varingrequire!ents about what !etadata the need.

    Migration is easier because ever other D3MS does it this wa.

    1owever& because S1'4is popular and because it !ight be confusing wereit to disappear& the advantages of conventional snta# are not a sufficientreason to eli!inate S1'4. $n fact& along with the i!ple!entation of$0,'MT$'02S61/M& there are enhance!ents to S1'4as well. These aredescribed in Section ?=.?;& N/#tensions to S1'4 State!entsO.

    There is no difference between the privileges required for S1'4state!entsand those required to select infor!ation fro! $0,'MT$'02S61/M. $neither case& ou have to have so!e privilege on an ob-ect in order to see

    infor!ation about it.

    The i!ple!entation for the $0,'MT$'02S61/M table structures in MSQLfollows the 0S$$S' SQL:@A standard +art ?? Schemata. 'ur intent isappro#i!ate co!pliance with SQL:@A core feature ,@? Basic informationschema.

    *sers of SQL Server @ (which also follows the standard) !a notice astrong si!ilarit. 1owever& MSQL has o!itted !an colu!ns that are notrelevant for our i!ple!entation& and added colu!ns that are MSQL"specific.'ne such colu!n is the /0$0/ colu!n in the$0,'MT$'02S61/M.T3L/Stable.

    lthough other D3MSs use a variet of na!es& li%e sscat or sste!& thestandard na!e is $0,'MT$'02S61/M.

    The following sections describe each of the tables and colu!ns that are in$0,'MT$'02S61/M. ,or each colu!n& there are three pieces ofinfor!ation:

    N$0,'MT$'02S61/M 0a!eO indicates the na!e for the colu!n inthe $0,'MT$'02S61/M table. This corresponds to the standardSQL na!e unless the Ne!ar%sO field sas NMSQL e#tension.O

    NS1'40a!eO indicates the equivalent field na!e in the closest S1'4state!ent& if there is one.

    Ne!ar%sO provides additional infor!ation where applicable. $f thisfield is NULL& it !eans that the value of the colu!n is alwas NULL. $fthis field sas NMSQL e#tension&O the colu!n is a MSQL e#tension tostandard SQL.

    8

    http://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/extended-show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/tables-table.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/extended-show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/tables-table.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.htmlhttp://dev.mysql.com/doc/refman/5.0/en/show.html
  • 8/14/2019 SQL.doc and queries

    9/12

    Transact=SQL e*tensions

    Transact"SQL enhances the power of SQL and !ini!iFes the occasions onwhich users !ust resort to a progra!!ing language to acco!plish a desiredtas%. Transact"SQL>s capabilities go beond the $S' standards and the !an

    co!!ercial versions of SQL.

    Most of the Transact"SQL enhance!ents (%nown as e#tensions) aresu!!ariFed here. The Transact"SQL e#tensions for each co!!and are in theeference Manual.

    T)e co('ute clause

    The Transact"SQL co!pute clause e#tension is used with the row aggregatefunctions su!& !a#& !in& avg& and count to calculate su!!ar values.Queries that include a co!pute clause displa results with both detail andsu!!ar rows. These reports rese!ble those produced b al!ost an

    Database Manage!ent Sste! (D3MS) with a report generator. co!putedisplas su!!ar values as additional rows in the results& instead of as newcolu!ns. The co!pute clause is covered in 6hapter A& R*sing ggregates&rouping& and Sorting.R

    Control=o2=2lo# lan"ua"e

    Transact"SQL provides control"of"flow language that can be used as part ofan SQL state!ent or batch. These constructs are available: begin...end&brea%& continue& declare& goto label& if...else& print& raiserror& return& waitfor&and while. Local variables can be defined with declare and assigned values. nu!ber of predefined global variables are supplied b the sste!.

    Transact"SQL also supports case e#pressions& which include the %ewordscase& when& then& coalesce& and nullif. case e#pressions replace the ifstate!ents of standard SQL. case e#pressions are allowed anwhere a valuee#pression is used.

    Stored 'rocedures

    'ne of the !ost i!portant Transact"SQL e#tensions is the abilit to createstored procedures. stored procedure is a collection of SQL state!ents andoptional control"of"flow state!ents stored under a na!e. The creator of astored procedure can also define para!eters to be supplied when the storedprocedure is e#ecuted.

    The abilit to write our own stored procedures greatl enhances the power&efficienc& and fle#ibilit of the SQL database language. Since the e#ecutionplan is saved after stored procedures are run& stored procedures cansubsequentl run !uch faster than standalone state!ents.

    9

    http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_7889_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_7889_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_7889_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_7889_START_RESTART_N%25
  • 8/14/2019 SQL.doc and queries

    10/12

    daptive Server"supplied stored procedures& called sste! procedures& aid indaptive Server sste! ad!inistration. 6hapter ?B& R*sing Stored+rocedures&Rdiscusses sste! procedures and e#plains how to create storedprocedures. Sste! procedures are discussed in detail in the eferenceManual.

    *sers can e#ecute stored procedures on re!ote servers. ll Transact"SQLe#tensions support return values fro! stored procedures& user"defined returnstatus fro! stored procedures& and the abilit to pass para!eters fro! aprocedure to its caller.

    E*tended stored 'rocedures

    n e#tended stored procedure (/S+) has the interface of a stored procedure&but instead of containing SQL state!ents and control"of"flow state!ents& ite#ecutes procedural language code that has been co!piled into a dna!iclin% librar (DLL).

    The procedural language in which an /S+ function is written can be anlanguage capable of calling 6 language functions and !anipulating 6datatpes.

    /S+s allow daptive Server to perfor! a tas% outside the D3MS in responseto an event occurring within the database. ,or e#a!ple& ou could use an /S+to send an e"!ail notification or networ%"wide broadcast in response to anevent occurring within the elational Database Manage!ent Sste!(D3MS).

    There are so!e daptive Server"supplied /S+s& called sste! e#tended

    stored procedures. 'ne of these& #p2c!dshell& allows ou to e#ecute anoperating sste! co!!and fro! within daptive Server. 6hapter ?C& R*sing/#tended Stored +rocedures&Rdescribes /S+s. The eference Manual includesdetailed infor!ation about sste! /S+s.

    /S+s are i!ple!ented b an 'pen Server(TM) application called 9+Server(TM)& which runs on the sa!e !achine as daptive Server. e!otee#ecution of a stored procedure is called a re!ote procedure call (+6).daptive Server and 9+ Server co!!unicate through +6s. 9+ Server isauto!aticall installed with daptive Server.

    Tri""ers

    trigger is a stored procedure that instructs the sste! to ta%e one or !oreactions when a specific change is atte!pted. 3 preventing incorrect&unauthoriFed& or inconsistent changes to data& triggers help !aintain theintegrit of a database.

    10

    http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_42621_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_42621_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_46249_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_46249_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_42621_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_42621_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_46249_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_46249_START_RESTART_N%25
  • 8/14/2019 SQL.doc and queries

    11/12

    Triggers can also protect referential integrit""enforcing rules about therelationships a!ong data in different tables. Triggers go into effect when auser atte!pts to !odif data with an insert& delete& or update co!!and.

    Triggers can nest to a depth of ?< levels& and can call local or re!ote storedprocedures or other triggers.

    De2aults and rules

    Transact"SQL provides %ewords for !aintaining entit integrit (ensuringthat a value is supplied for ever colu!n requiring one) and do!ain integrit(ensuring that each value in a colu!n belongs to the set of legal values forthat colu!n). Defaults and rules define integrit constraints that co!e intopla during data entr and !odification.

    default is a value lin%ed to a particular colu!n or datatpe& and inserted bthe sste! if no value is provided during data entr. ules are user"defined

    integrit constraints lin%ed to a particular colu!n or datatpe& and enforcedat data entr ti!e. ules and defaults are discussed in 6hapter ?@& RDefiningDefaults and ules for Data.R

    Error )andlin" and set o'tions

    nu!ber of error handling techniques are available to the Transact"SQLprogra!!er& including the abilit to capture return status fro! storedprocedures& define custo!iFed return values fro! stored procedures& passpara!eters fro! a procedure to its caller& and get reports fro! globalvariables such as error. The raiserror and print state!ents& inco!bination with control"of"flow language& can direct error !essages to the

    user of a Transact"SQL application. Developers can localiFe print and raiserrorto use different languages.

    set options custo!iFe the displa of results& show processing statistics& andprovide other diagnostic aids for debugging our Transact"SQL progra!s. llset options e#cept showplan and char2convert ta%e effect i!!ediatel.

    The following paragraphs list the available set options. ,or !ore infor!ation&refer to the eference Manual.

    parseonl& noe#ec& prefetch& showplan& rowcount& nocount& andtablecount control the wa a quer is e#ecuted. The statistics options

    displa perfor!ance statistics after each quer. flush!essagedeter!ines when daptive Server returns !essages to the user. Seethe +erfor!ance and Tuning uide for !ore infor!ation.

    arithabort deter!ines whether daptive Server aborts queries witharith!etic overflow and nu!eric truncation errors. arithignoredeter!ines whether daptive Server prints a warning !essage if aquer results in an arith!etic overflow. ,or !ore infor!ation& seeRrith!etic errorsR.

    11

    http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_37302_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_37302_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_3792_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_37302_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_37302_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_3792_START_RESTART_N%25
  • 8/14/2019 SQL.doc and queries

    12/12

    offsets and procid are used in D3"Librar(TM) to interpret results fro!daptive Server.

    datefirst& datefor!at& and language affect date functions& date order&and !essage displa.

    char2convert controls character"set conversion between daptiveServer and a client.

    te#tsiFe controls the siFe of te#t or i!age data returned with a selectstate!ent. See RTe#t functions used for te#t and i!age dataR.

    cursor rows and close on endtran affect the wa daptive Serverhandles cursors. See R,etching data rows using cursorsR.

    identit2insert allows or prohibits inserts that affect a table>s $D/0T$T7colu!n. See Raps due to insertions& deletions& identit grab siFe& and

    rollbac%sR.

    chained and transaction isolation level control how daptive Serverhandles transactions. See RSelecting the transaction !ode andisolation levelR.

    self2recursion allows daptive Server to handle triggers that causethe!selves to fire. See RTrigger self"recursionR.

    ansinull& ansi2per!issions& and fipsflagger control whether daptiveServer flags the use of nonstandard SQL. string2rtruncation controlswhether daptive Server raises an e#ception error when truncating achar or nchar string. See R6o!pliance to 0S$ standardsR.

    quoted2identifier controls whether daptive Server treats characterstrings enclosed in double quotes as identifiers. See RDeli!itedidentifiersRfor !ore infor!ation.

    role controls the roles granted to ou. ,or infor!ation about roles& seethe Sste! d!inistration uide.

    12

    http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_32745_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_51067_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_20680_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_20680_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_53713_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_53713_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_49492_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_3524_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_1448_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_1448_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_32745_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_51067_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_20680_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_20680_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_53713_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_53713_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%15_49492_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_3524_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_1448_START_RESTART_N%25http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=2919?target=%25N%14_1448_START_RESTART_N%25