Home » SQL & PL/SQL » SQL & PL/SQL » SQL Expression
SQL Expression [message #401162] Fri, 01 May 2009 20:34 Go to next message
sharmakranthi
Messages: 14
Registered: February 2009
Location: Bangalore
Junior Member
1.

A simple comparison condition specifies a comparison with expressions or subquery results.

2.
select * |{[DISTINCT] column|expression [alias],.....}
FROM table;


From the above two statements, i would like to know the meaning of EXPRESSION
Re: SQL Expression [message #401163 is a reply to message #401162] Fri, 01 May 2009 20:38 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/

When all else fails, Read The Fine Manual!
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions001.htm#sthref2625
Re: SQL Expression [message #401166 is a reply to message #401163] Fri, 01 May 2009 21:05 Go to previous messageGo to next message
sharmakranthi
Messages: 14
Registered: February 2009
Location: Bangalore
Junior Member
Thanks for sharing the link. From that link i had arrived at the below example.

I would like to confirm whether the expression means only INITCAP(last_name)or INITCAP(last_name) & =(operator)

This SET clause has the expression INITCAP(last_name) instead of the quoted string 'Smith':

SET last_name = INITCAP(last_name);


Re: SQL Expression [message #401170 is a reply to message #401162] Fri, 01 May 2009 22:51 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I would like to confirm whether the expression means....
A valid "expression" does not generate any syntax error.
Feel free to experiment to see for yourself what works & what results in some syntax error.

[Updated on: Fri, 01 May 2009 22:52]

Report message to a moderator

Re: SQL Expression [message #401171 is a reply to message #401170] Fri, 01 May 2009 23:20 Go to previous messageGo to next message
sharmakranthi
Messages: 14
Registered: February 2009
Location: Bangalore
Junior Member
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions001.htm#sthref2625

as per this link the definition of Expression is a combination of one or more values, operators, and SQL functions that evaluates to a value. An expression generally assumes the datatype of its components.

From the above definition, i would like to relate the same to below mentioned code

SET last_name = INITCAP(last_name);


the definition says combination of one or more values, operators, and SQL functions.
So from the above code i can relate definition as,
one or more values means last_name
INITCAP means SQL Function
Operator means = or not?

Please confirm can i consider = as Operator or not?

I would like to know this. Not on any errors.
Re: SQL Expression [message #401174 is a reply to message #401162] Fri, 01 May 2009 23:49 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Please confirm can i consider = as Operator or not?
What does the manual say?
Please provide URL to verify the answer.
Re: SQL Expression [message #401178 is a reply to message #401174] Sat, 02 May 2009 00:09 Go to previous messageGo to next message
sharmakranthi
Messages: 14
Registered: February 2009
Location: Bangalore
Junior Member
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions001.htm#sthref2625

Please find the url which u sent for your reference.
As per this itsays INITCAP(last_name)is an expression, whereas the definition says Operator.I = is also a operator. Kindly confirm.
Re: SQL Expression [message #401185 is a reply to message #401178] Sat, 02 May 2009 01:33 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Operators are defined and listed in SQL Reference, Chapter 4 Operators

Regards
Michel
icon7.gif  Re: SQL Expression [message #401301 is a reply to message #401171] Sun, 03 May 2009 23:51 Go to previous messageGo to next message
sharmakranthi
Messages: 14
Registered: February 2009
Location: Bangalore
Junior Member
as per the definition-Expression is a combination of one or more values, operators, and SQL functions that evaluates to a value.
SET last_name = INITCAP(last_name);


So from the above code i could only indentify,
one or more values as last_name
INITCAP as SQL Function
Operator as what?

please provide me the syntax for the definition of Expression that is-"combination of one or more values, operators, and SQL functions that evaluates to a value."
Thanks
Re: SQL Expression [message #401302 is a reply to message #401162] Sun, 03 May 2009 23:56 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>please provide me the syntax for the definition of Expression t
Why do you think somebody other than YOU are responsible for what you desire????????????????

sharmakranthi,
Please provide me the meaning of LIFE!
Re: SQL Expression [message #401347 is a reply to message #401302] Mon, 04 May 2009 03:06 Go to previous messageGo to next message
sharmakranthi
Messages: 14
Registered: February 2009
Location: Bangalore
Junior Member
I am thinking somebody to answer for my desire. since u have sent the link and as per the definition given in that-EXPRESSION-is a combination of one or more values, operator and sql functions.

I was in need of confirmation whether i can assume Operator as = in the below mentioned code.
SET last_name = INITCAP(last_name);


Please provide the answer for above question

BlackSwan,
definetly i would the give the meaning of LIFE!
Re: SQL Expression [message #401350 is a reply to message #401347] Mon, 04 May 2009 03:13 Go to previous message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Michel Cadot wrote on Sat, 02 May 2009 08:33
Operators are defined and listed in SQL Reference, Chapter 4 Operators

Regards
Michel


Previous Topic: Ignore Duplicate Rows
Next Topic: Parallel execution of Procedure.
Goto Forum:
  


Current Time: Sat Feb 15 12:18:45 CST 2025