travelerbg
Regular Member
- Feb 23, 2010
- 234
- 10
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 ?
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 ?