Re: Few queries

From: Tamas Bojcan - bojci (bojcan_at_freemail.hu)
Date: 08/26/04


Date: Thu, 26 Aug 2004 09:06:09 +0200

Hi,

A.) The identity value is numeric(38,0) not integer. This value casted to
the type of identity column which can be tinyint, smallint, int, bigint,
decimal, numeric. You get error message if the identity value greater than
the max. value of the column's datatype. The identity can be negative just
set the increment value to less than zero.

B.) Use four part names => server.database.owner.object

"Amit" <contactamit22@indiatimes.com> wrote in message
news:065c01c48b38$c5ecb3b0$a401280a@phx.gbl...
> Hi,
>
> A] Regarding Identity column values:
> Create table A(id int identity(1,1) Primary key)
> For above table,
> 1. What will happen to the insert statement when the
> identity column value has reached the maximum value
> defined for integer ?
> My answer: Should generate an error message.
>
> 2. Will identity value ever be negative ?
> My answer: NO
>
> B] Can we execute join queries on tables in two different
> databases ?
>
> C] Can we have DML statements in the body of function ?
> My answer: yes but only for table variables declared
> inside the function / in the return type.
>
> Thanks in advance.
> Amit



Relevant Pages

  • Few queries
    ... A] Regarding Identity column values: ... Create table A(id int identity(1,1) Primary key) ... C] Can we have DML statements in the body of function? ...
    (microsoft.public.sqlserver.programming)
  • Re: Passing NULL Objects
    ... long accountNumber){int accNum=0; ... public Integer searchAccounts(Vector bankAccounts) { ... int value, which is a primitive, only to an object. ... lookup, I'd pass back a false in the boolean, followed by the error message ...
    (comp.lang.java.help)
  • Re: operator function
    ... >> of them have anything to do with what the error message seems ... Setting (int h, int m, int s, int TT) ... Now the compiler knows, that it is safe to use that function on a const ... >> operator returns a Setting object. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: question
    ... "int main{" ... you printed an error message and terminated the program. ... You're asking fread() to read 512 element, ... it's conventional to print error messages to stderr, ...
    (comp.lang.c)
  • Re: Getting at @@IDENTITY
    ... int ID //identity column ... char 10 fld1 ... Now I need the identity column from that insert. ...
    (microsoft.public.sqlserver.ce)