Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.09.11;
Скачать: CL | DM;

Вниз

uniqueidentifier   Найти похожие ветки 

 
MakNik ©   (2003-08-19 15:58) [0]

Подскажите как корректно работать с типом uniqueidentifier в MSSQL? Как его генерировать? копировать?


 
ZrenBy ©   (2003-08-19 16:01) [1]

newid()
куда копировать ?


 
MakNik ©   (2003-08-19 16:33) [2]

А как сделать чтобы этот процесс происходил автоматически (чтобы добавляя записи генерировался ID)?


 
ermserg ©   (2003-08-19 16:37) [3]

CREATE TABLE t1
(f1 uniqueidentifier NOT NULL DEFAULT newid())


 
MakNik ©   (2003-08-19 16:39) [4]

newid()- это что??? можно подробнее, а то я совсем чайник...


 
sniknik ©   (2003-08-19 17:03) [5]

почитай BOL (ставится вместе с MSSQL) там все описано

оттуда

NEWID
Creates a unique value of type uniqueidentifier.

Syntax
NEWID ( )

Return Types
uniqueidentifier

Examples
A. Use the NEWID function with a variable
This example uses NEWID to assign a value to a variable declared as the uniqueidentifier data type. The value of the uniqueidentifier data type variable is printed before the value is tested.

-- Creating a local variable with DECLARE/SET syntax.
DECLARE @myid uniqueidentifier
SET @myid = NEWID()
PRINT "Value of @myid is: "+ CONVERT(varchar(255), @myid)

Here is the result set:

Value of @myid is: 6F9619FF-8B86-D011-B42D-00C04FC964FF

Note The value returned by NEWID is different for each computer. This number is shown only for illustration.

.................................



Страницы: 1 вся ветка

Текущий архив: 2003.09.11;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.015 c
4-33851
Vorobyev Sergey
2003-07-10 10:24
2003.09.11
Можно ли получить Handle процесса, не зная его PID?


3-33519
BillyJeans
2003-08-19 15:36
2003.09.11
Файлы _QSQL153.DBF, как с ними бороться?


14-33736
Shopot
2003-08-23 20:39
2003.09.11
Картинки и иконки


3-33522
MakNik
2003-08-19 15:58
2003.09.11
uniqueidentifier


1-33590
dez
2003-08-28 12:42
2003.09.11
TdxEdit и др.