Social Question

WhyIam's avatar

How to add conditions in select statement in oracle?

Asked by WhyIam (17points) December 25th, 2009

While i created the statement
select TNGSTNO||’,’|| CSTNO||’,’||RCNO from partymaster and i want to apply conditon statement here…

Observing members: 0 Composing members: 0

3 Answers

WhyIam's avatar

Just add the decode

StupidGirl's avatar

SELECT * FROM table WHERE field = value

amnorvend's avatar

In most cases in SQL, if you want to add a condition, you should use a WHERE clause as @StupidGirl points out. This is true in SELECT, UPDATE, and DELETE statements. The exception is aggregate functions, but that’s a different subject entirely.

If you’re new to SQL, you might consider a book on the subject. SQL isn’t terribly difficult, but it’s not necessarily intuitive. I hear this is a pretty good book for getting started with SQL.

Answer this question

Login

or

Join

to answer.
Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther