SQL help

Discussion in 'Other Languages' started by travelerbg, Jan 26, 2013.

  1. travelerbg

    travelerbg Regular Member

    Joined:
    Feb 23, 2010
    Messages:
    235
    Likes Received:
    10
    Home Page:
    I am stuck on SQL assignment and got few questions

    first i need to create a table with a column for employee number, which should be 2 upper case alphabetic characters followed by 4 numeric characters. How to set alphabetic characters ? I use this code for checking the numeric value but not sure what to use for alphatic values.


    constraint format_check_empno
    check(
    (substr(empno,3,1) between '0' and '9')
    and
    (substr(empno,4,1) between '0' and '9')
    and
    (substr(empno,5,1) between '0' and '9')
    and
    (substr(empno,6,1) between '0' and '9')
    )


    Could anyone help me ?