Home » SQL & PL/SQL » SQL & PL/SQL » is user() a keyword in mysql (oracle 11g)
is user() a keyword in mysql [message #596829] Thu, 26 September 2013 10:05 Go to next message
vkanuri
Messages: 20
Registered: August 2013
Location: United States
Junior Member
Hi,
I have a following insert statement in mysql.In that one of the field is user().Is this a keyword in mysql or it has a different meaning.In oracle as far as I know user is a keyword.

 INSERT INTO PROCESS_RUN (PROCESS_ID, PROCESS_START_DATE, PROCESS_STATUS, CREATE_USER_ID, CREATE_DATE, SALE_LOCATION_ID)
    VALUES (791,NOW,'COMPLETE', USER(),NOW,1);


Thanks..
Re: is user() a keyword in mysql [message #596830 is a reply to message #596829] Thu, 26 September 2013 10:07 Go to previous messageGo to next message
BlackSwan
Messages: 22792
Registered: January 2009
Senior Member
yes


[EDITED by LF: removed unnecessary quote of the whole previous message]

[Updated on: Fri, 27 September 2013 14:37] by Moderator

Report message to a moderator

icon13.gif  Re: is user() a keyword in mysql [message #596837 is a reply to message #596829] Thu, 26 September 2013 11:33 Go to previous messageGo to next message
Michel Cadot
Messages: 59147
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
In oracle as far as I know user is a keyword.


No, it is a function.

Re: is user() a keyword in mysql [message #596869 is a reply to message #596837] Thu, 26 September 2013 21:54 Go to previous messageGo to next message
vkanuri
Messages: 20
Registered: August 2013
Location: United States
Junior Member
Can you please provide me an example in oracle for user ().what does it return.


Thanks.
Re: is user() a keyword in mysql [message #596870 is a reply to message #596869] Thu, 26 September 2013 22:02 Go to previous messageGo to next message
BlackSwan
Messages: 22792
Registered: January 2009
Senior Member
SELECT USER FROM DUAL;
Re: is user() a keyword in mysql [message #596941 is a reply to message #596869] Fri, 27 September 2013 12:58 Go to previous message
Bill B
Messages: 1099
Registered: December 2004
Senior Member
Try the following insert in oracle

 INSERT INTO PROCESS_RUN (PROCESS_ID, PROCESS_START_DATE, PROCESS_STATUS, CREATE_USER_ID, CREATE_DATE, SALE_LOCATION_ID)
    VALUES (791,sysdate,'COMPLETE', USER,sysdate,1);
Previous Topic: hex to dec
Next Topic: Returning updated rows with REF CURSOR?
Goto Forum:
  


Current Time: Sat Sep 20 19:35:03 CDT 2014

Total time taken to generate the page: 0.04447 seconds