how to use uniqueidentifier in sql 2008r2

Posted by Shanky11 under Sql Server on 2/28/2013 | Points: 10 | Views : 783 | Status : [Member] | Replies : 4
i have created a table by right click database create table
two column messageuid uniqueidentifier,message nvarchar(255)

now when i m inserting value in message and executing it nothing is happening
when i insert by writting query its ok...................
iwhy this s happenig????????????telll me but not by query......




Responses

Posted by: Abhaydhar on: 2/28/2013 [Member] Starter | Points: 25

Up
0
Down

It a bug

ABD

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 3/20/2013 [Member] Bronze | Points: 25

Up
0
Down
Hi,
Please try this.
1) Right click on the table.
2) Select Top 200 rows
3) Insert values
4) click on tab.


Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 3/20/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Shanky11

You will have to assign a default value to messageuid as (newid())

Then it will work

I am attaching the screenshot

 Download source file

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 3/20/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Shanky11

You will have to assign a default value to messageuid as (newid())

Then it will work

I am attaching the screenshot

 Download source file

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response