ExamNotes.net  -  IT certification portal

ForumsCertResearchTop sitesNewslettersFree email
HomeRegister
Exams Notes
Practice exams
Exam games
Questions by email
Online training
Training videos
College degrees
Boot camps
Book store
Links directory
Tell a friend
For webmasters

CompTIA Exam Vouchers
Save money on CompTIA exams
Question of the day
Sign up to receive
interactive practice questions
for MCSE, CompTIA
Cisco and other exams
TestKing
Get MCSE, MCSD, CCNA, CCNP,A+, N+ and many more

* ExamSheets *
Guide for Success!
Actual Questions & Answers
MCSE, MCSD, A+ ,CCNA, CCNP
Oracle 8i, Oracle 9i

Online practice tests

Certification sites

Online university

Online college

Online education

Distance learning

Software forum

Server administration forum

Programming resources






This is interesting: Free IT Magazines | Databases help forum



General discussions > Public newsgroups > microsoft.public.cert.mcdba > 70-229:uniqueidentifier

Show a Printable Version
Email This Page to Someone!
Receive updates to this thread






Author 70-229:uniqueidentifier
janie
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
70-229:uniqueidentifier

For a column with the following definition:

LogID uniqueidentifier DEFAULT (NEWID())

The Readiness Review says that it is Nullable and
Updatable. My questions are:
1. with a default definition, this column will never ne
NULL. Why it is Nullable?
2. as a uniqueidentifier column how can you update it?

Will appreciate any help.

Janie

Report this post to a moderator

Old Post 03-14-03 08:23 PM
Reply w/Quote Edit/Delete Message IP: Logged
Tim
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
Re: 70-229:uniqueidentifier

"janie" <jzhao@tarrantcounty.com> wrote in message
news:052901c2ea68$a71fe960$300
1280a@phx.gbl...
> For a column with the following definition:
>
> LogID uniqueidentifier DEFAULT (NEWID())
>
> The Readiness Review says that it is Nullable and
> Updatable. My questions are:
> 1. with a default definition, this column will never ne
> NULL. Why it is Nullable?


Well, without more information, it *may* be nullable. It gets the default
NULL/NOT NULL setting since it's not specified, and the default is
configurable. Rather than learn the default (and I think the SQL default is
the opposite of the ANSI default) or rely on this setting, it's wise to
always specify.

But, assuming NULL is the default, you can still explicitly supply a value
of NULL:
INSERT ThatTable(LogID) VALUES(NULL)

UPDATE can do the same thing. You're right that it won't be NULL without a
little effort, but it is still nullable.

> 2. as a uniqueidentifier column how can you update it?


There's nothing special required at all.
UPDATE ThatTable
SET LogID = '1234-4567890-etc'

In fact, I think this is the most useful application of this data type. It's
similar to IDENTITY, but since every client can reliably generate unique
values on its own, it won't have to requery the database to find out what
value has been assigned. Or fiddle with @@IDENTITY and other identity
retrieval functions to embed in further commands. The client can very simply
embed the generated ID in a full query.


Report this post to a moderator

Old Post 03-14-03 08:23 PM
Reply w/Quote Edit/Delete Message IP: Logged
All times are GMT.
Post new thread   Post reply

Featured site: MCSE, MCSD, CompTIA, CCNA training videos



Forum Jump:
Rate This Thread:
Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is OFF.
 

ExamNotes forum archive


Powered by: vBulletin 2.2.8
Copyright ©2000, Jelsoft Enterprises Limited.

  Free Braindumps | mcse braindumps