is this syntax right?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sushjames
    New Member
    • May 2007
    • 7

    #1

    is this syntax right?

    Here this Syntax doesn't have where clause. SO is it possible to specify a condition without where clause also?. Can someone help me pls.

    select empname from employess empname like 'jack%';
  • frozenmist
    Recognized Expert New Member
    • May 2007
    • 179

    #2
    Originally posted by sushjames
    Here this Syntax doesn't have where clause. SO is it possible to specify a condition without where clause also?. Can someone help me pls.

    select empname from employess empname like 'jack%';
    Hi Sush,
    You have to give where clause for the condition.
    You can also have the query using case, if you dont want to use where...

    [code=sql]
    select case when empname like 'jack%' then empname end as empname from employess ;
    [/code]

    Cheers

    Comment

    Working...