If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > operator :=

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-17-10, 23:14
Chengshun Xia Chengshun Xia is offline
Registered User
 
Join Date: Apr 2010
Posts: 7
operator :=

Hi,
could anyone tell me what is the operator used for and what is between difference operator= and operator := .


thanks
Reply With Quote
  #2 (permalink)  
Old 06-02-10, 21:23
Mohsinkhan Mohsinkhan is offline
Registered User
 
Join Date: Jun 2010
Posts: 4
SET @t1=1, @t2=2, @t3:=4;
SELECT @t1, @t2, @t3, @t4 := @t1+@t2+@t3;

in the first line where ur defining the a variable using set u can use both = or :=


in the second statement u setting the @t4 to some other variables u have to use := , if u use '= ' it takes as comparison operator
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On