How to prevent users from inserting letters to varchar2 column

ALTER table emp
Add tel_no varchar2 (15) constraint emp_tel_no_ch check (to_number (tel_no) > 0)


It works well, but I wonder

When I do this

Suppose that the emp table has 2 columns name, tel_no

insert into the emp
values ('ahmed', "10e2")

the user can insert and check constraint does not
Why when e inserted between numbers constraint does not work?

user12087786 wrote:

and use my code when I want to stop to insert characters (just insert numbers)

If you mean, by numbers, numbers:

SQL> create table t1(s varchar2(10));

Table created.

SQL> alter table t1
  2  add constraint t1_chk1
  3  check(regexp_like(s,'^\d*$'))
  4  /

Table altered.

SQL> insert into t1 values('10e2');
insert into t1 values('10e2')
*
ERROR at line 1:
ORA-02290: check constraint (SCOTT.T1_CHK1) violated

SQL> insert into t1 values('AbC');
insert into t1 values('AbC')
*
ERROR at line 1:
ORA-02290: check constraint (SCOTT.T1_CHK1) violated

SQL> insert into t1 values('123x');
insert into t1 values('123x')
*
ERROR at line 1:
ORA-02290: check constraint (SCOTT.T1_CHK1) violated

SQL> insert into t1 values('123');

1 row created.

SQL> 

SY.

Tags: Database

Similar Questions

  • How to use family security to block streaming video photos etc. on Windows Media Player. Or how to prevent users from video straeming

    How to use family security to block streaming video photos etc. on Windows Media Player. Or how to prevent users from video straeming

    Hello

    Please go through this article, change settings for streaming media streaming in Windows Media Player , and you will be able to solve this problem.

  • How to prevent users from installing new programs in Windows 7

    Hello

    I need to prevent users to install (and download) of new programs in Windows 7. I am responsible for three computers. They are not on one network (other than the internet, of course).

    I read the article "How to prevent users from installing new programs in Windows 7" but I'm not sure what choice to make when I get to the choice of Windows Installer. I'm also not quite know how to cancel that so I can install the software when I have to. I've never done this if I want to be very careful.

    Can anyone help?

    Many thanks,

    KK

    Are their accounts 'Administrator' or 'Standard' user level?

    If they are directors of the machine, and then create a new Admin account (only you know the password) and then lower their Standard user accounts. If they attempt to install programs now it should be prompted to enter the Admin password that they won't.

    User accounts - https://support.microsoft.com/en-us/kb/2663817

    Also see http://www.sevenforums.com/tutorials/299-user-account-control-uac-change-notification-settings.html for info UAC - and adjust the required level.

    If their accounts are accounts administrator and for some reason must be a competent user, then will probably be able to undo everything you put up anyway.

    PS - what specific article?

  • How to prevent users from a domain network to connect from another pc

    We have a domain based LAN with 6 users with individual workstations and a server (windows server 2003).
    Is it possible to configure a workstation in such a way that they would make newspaper-on the system using only a user ID?
    Currently all users can connect from any workstation using his ID and password. I want to avoid this.
     
    For example:
    The USER is a user who uses a WS-1 station,
    B the USER is a user who uses WS-2 workstation,
    USER-C is a user using the workstation WS-3
    then currently USER 1, USER 2 and USER-3 can log - on the system from any workstation using a credential.
     
    I want to avoid this.
     
    What I want is, WS-1 workstation can only be connected to the USER-A credentials, the WS-2 workstation can only be connected by the credentials of the USER-B and so on.
     
    Is this possible?

    Hello Chetan,

    You're in the wrong Forum for this type of question which is one most appropriate for the ad server and group policy (with possibly the local policy on the workstations).  I would move this if I could, but we do not have this feature in our magic Toolbox.

    To start, see if the information contained in this TechNet article help: http://social.technet.microsoft.com/Forums/windowsserver/en-US/3639e354-3a41-41b9-bf2e-74abc49e23d6/user-permision-on-workstations.

    If not, then open a new question/thread in this same forum http://social.technet.microsoft.com/Forums/windowsserver/en-US/ and ask your question there.  I am sure that you will get detailed advice covering both sides of the situation (Server and workstation) better than here where there is a tendency to focus only on client computers, not servers, unless that quite simple (and being an MCSE, I know that's not really simple - but it also isn't really very difficult if you understand the basics - and even then they should be able to help) to find articles or provide instructions to pass you this part).  I have no doubt that they can also bring about changes, you need to establish which are specific to the workstation (and maybe even have a model of batch file to semi-automate the process - but now I'm guessing / hoping).

    In any case it is really where you should start and return only if explain you what it is about the customers that they cannot handle and need us to help you (because I can't imagine that happening).

    Good luck!

    Kosh

  • How to prevent users from changing the network connection?

    Hi all

    I have a weird problem. I set up my HP ThinPro T610, I have to say is simple enough. I want users just to turn on the computer, wait a few minutes and log into the Terminal Server Services on the Server RDP connection, so I basically blocked every user of things could possibly click - they have no taskbar, etc. Connection Manager.

    Now, there's one thing I can't block - 10 seconds, users can see "Network connection" pop up, in which they can - at my enormous disbelief -change the connection settings.

    I can't find a way to block this... everyone can share their experience with this issue?

    Hello

    Hope you use thinpro 5 OS

    Could you please try these step

    1 log in administrator mode

    2 Goto advanced - Xterminal regeditor and type

    3. go in config wizard

    4. change the value to enablenetworkcheck and save and reboot

    ====================================================

    Although I am an employee of HP, I speak for myself and not for HP. ===

    * Click on the star of CONGRATULATIONS on the left say "thank you."

  • How to prevent users from installing new programs in windows 7 Home premium

    I see that if you have full or professional that there is a thing called Local Group Policy Editor but I can't find it in the Home Premium edition. Y at - it something I can do on Home Premium to disable other users to install software on my computer. I have three children and they constantly put unwanted programs on the computer. Help, please. Thank you

    It would be good!

    Well seems the only thing to do is to spend the money, you will need to upgrade your version of Windows to the professional or ultimate edition:-

    http://Windows.Microsoft.com/en-in/Windows7/products/features/Windows-Anytime-Upgrade

    I also suggest to make a new profile user limited to children and put a password on your.

  • prevent users from deleting any other data

    I have a table

    create table T)
    infoID number primary key,
    Info varchar2 (4000).
    user varchar2 (1)
    );

    and users a, b, c with privileges of object on table T.

    What is the best way to prevent users from deleting any other data?

    1. create a view for each user to interacat with (where user = 'a') and to revoke the privileges of table T.
    2. use the procedures or trigers to catch a bad user.
    3.

    you will have 1 table T shared between 3 users a, b and c and the need of the user a power manage only his own lines (manage is meaning insert/update/delete/select)

    so the solution could be seen with trigger 'instead of', but Oracle has developed functionality especially for this DTV: [virtual private database | http://download.oracle.com/docs/cd/B28359_01/network.111/b28529/intro.htm#i1010494 |] VPD]

  • prevent users from deleting files [Android]

    I use the Adobe on Android app and was trying to prevent users from deleting files when using it.

    Samsung Tab installed Pro 4.4.2 and Adobe version 15.1.1

    We currently have all of the features that disables file deletion functionality.

    Thank you

    Adobe Acrobat Reader team

  • The TrustedInstaller user took possession of most of my WINDOWS files! How to restore my computer and how to prevent this from happening?

    I noticed that the user TrustedInstaller took possession of my PC. He is the owner of most of my Windows files. How to restart my computer and how

    prevent this happening again?

    I know that I can change of ownership and then each individual file permissions, but it would take two days or something, I can stop this in a simple way or how do I restart my computer?

    This user is logged on to Microsoft? I mean if this is the case, then I guess I don't have to worry?

    I would appreciate an answer so =)

    This is how it is supposed to be.

    TrustedInstaller is a built-in account that allows to modify Windows itself, for example during the installation of the updates.

    This is to prevent the Windows system files or inadvertently or maliciously crushed.

  • How to prevent users to clear the history on my computer?

    How to prevent someone delete the history on computer? I need help with this...

    Hello

    If you have company, integral or professional strategies Group (GPedit) and for other versions there
    Parental control.

    Start - type in the search-> find gpedit.msc in top - box double click.

    See this and the 'related links '.

    How to install and use Parental controls in Vista
    http://www.Vistax64.com/tutorials/95139-parental-controls-Setup-use.html

    and these:

    Setting up Windows Vista's Parental control
    http://www.bleepingcomputer.com/tutorials/tutorial139.html

    Set up Parental controls
    http://Windows.Microsoft.com/en-us/Windows-Vista/set-up-parental-controls

    =======================================

    -Start - type in the box search-> Regedit find manually top - make a right click on - RUN AS ADMIN

    HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel

    In the right pane - set a DWORD value named DisableDeleteBrowsingHistory to 1

    What it defines for the particular user

    Put in the key Explorer\Control Panel

    who assigns it to all users.

    I hope this helps.
    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • Is there a setting that I can activate to prevent users from turning off the computer?

    How prevent we Shut Down

    How do you define a computer or a user to prevent shutting down the computer. ?
    I had an account with complete administration and he's doing a backup of Windows, but the other user is allowed to force closing down since the other user is always log-in (locked).

    Is it possible to prevent users not to shut down the computer if another user is connected? I know it is the settings where you can change the Start Menu, but it is not good enough.

    Alan

    Hello

    I suggest you follow these methods and check.

    If you have Windows 7 Ultimate or Professional Editions follow method 1, if you have Windows 7 Home Premium or lower editions go to method 2

    Method 1: Change the settings of group policy and see.

    You can configure the policy setting determines which users can shut down the local computer. Navigate to the following location in the Management Console (GPMC, Group Policy),

    Click the Start button, type gpedit.msc in the search field.

    Navigate to the following location:

    Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\ Shut down the system

    Double click stop the system, select the user group you want to disable and click Remove > apply > OK.

    Simply restart your PC and connect users to check if the function disable and remove Shutdown account works.

    Method 2:

    a. must turn off and remove Shutdown option by using the registry editor.  Open the registry editor, navigate to the following path: HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

    b. Select Explorer in the left pane, right-click in the right pane and select new > DWORD; then name it as NoClose.

    c. double-click NoClose, and replace the value Hex 1; Click OK, and then close the registry editor.

    d. restart, you'll be able to disable and remove the Windows 7 Edition stop Home Premium or less in this way.

    I hope this helps!

  • How to add user from another computer as a Local user for file sharing permissions

    Hello, I'll put up for two computers to share files on a network.

    I just need to figure out how to add a user from another computer as a local user, I can change its permissions of file sharing.

    Here's where I'm stuck:

    I am trying to add a new user, but:

    How can I add a user somewhere else on my network to this list?

    I tried to add one here in the computer management:


    How can I add my network user?  I tried to do it in this format:

    Thank you!

    Sure thing. You can add a list in the registry with the name of the account that you want to hide from the login screen.  This site explains how: http://www.tech-recipes.com/rx/6222/windows-7-vista-xp-hide-user-account-from-welcome-screen-login-screen/

    Windows XP and beyond.

  • ISE 1.4 reviews portal customization - prevent users from saving passwords in the browser

    Hi all

    Do central web authentication for a wireless network of comments I'm deployment ISE 1.4 for a customer. Guest access works very well, however the customer asked me to prevent users to save user names and passwords in the browser.

    I don't see anywhere to prevent this thought the GUI of ISE, which leads me to think that we will need to change the HTML Portal.

    Point 1.2 of the ISE, Cisco provide documentation and code to do so at the following ADDRESS:

    http://www.Cisco.com/c/dam/en/us/TD/docs/security/ISE/how_to/HOWTO-42-cu...

    These instructions do not work for ISE 1.4 as the guest access menus have changed. In particular, only advanced customization that appears to be available is to download a file EHT CSS customize it and downloading to the ISE.

    From my limited HTML knowledge, customize the file CSS only allows me to change the appearance of the portal, not the functionality.

    Did someone knows if it is possible to cut the custom HTML code and install it on ISE 1.4? Looking through the release notes, this has been replaced in point 1.3 of the ISE when they Redid the feedback portal menuss.

    Thank you

    James

  • How to add users from a different domain?

    I have 3 ESXi hosts and a server vCenter on "area A". I have a separate domain, 'area B' set up with a confidence of 2-way "area A".

    How can I add users 'domain' B to vCenter server on 'area A' so that they can connect? When I go to add permissions in vCenter, I can select appear 'area B' but not the users in the list and I can't manually, type in a 'domain' user B and add it. But I can add users from domain A, since the hosts and vCenter server on this domain.

    I don't know if it's important, but the approval of 2 lanes between these areas is not a transitive trust relationship.

    Thank you in advance for any help you can offer.

    -Joey

    Create a group in domain B, add users to this group. Create a group in domain A, and then add the domain group B. Now assign the Group of features in vSphere. You could use the built-in course examples or create new ones.

  • Prevent users from opening a PDF form in preview Mac

    When I create an AcroForm, it does not have the same thing when someone doesn't fill it out in preview, and when I get the form back from them, some of the information in the fields of the form is missing.

    Is there a way to prevent Mac users from opening the form in the preview? Or give them a message that the form must be completed using Reader?

    You can't stop them to do (except while standing next to their computer with a big stick).

    You might consider having a large field on the warning page that the file should be used (or other), what is hidden using Acrobat JavaScript.

    Be aware that we are now dealing with a very large number of PDF readers.

    Included with computers: overview of Mac OS, Windows player.

    Included with the browsers: Chrome, Firefox.

    Included with portable devices.

    Anyone who gets a computer these days actually gets a PDF Viewer that's bad with shapes. You must give them a good reason to download additional software. (Or even, frankly, to renounce forms PDF. "I think that their day has passed to a general public who could fill out a form of browser).

Maybe you are looking for

  • Cannot install the latest display driver for Vista 32 - bit Equium A200

    Hi all I'm trying to update my display driver to the latest review posted for my laptop model Toshiba site but the performance of the installation executable I m returned with an error saying that my system is not compatible with the driver see 7.14.

  • What's worse, a phone or a PC crash?

    Although I'm already getting a new laptop, my laptop froze last night, forcing a hard reset. After the reboot, he went in a windows update screen, 'Do not turn off, windows update'. He always did this when I went to bed. When I woke up, we were told:

  • ENVY 17 t-j100: 03F0

    My hard drive crashed while I replaced it. Now when I turn on the computer, I get an error of 03F0. But if I press Ctrl Alt Del it restarts normally. Is there a way to clear the error now that the hard drive is replaced?

  • Capture of key press on when the focus is not on VI. (event does not work).

    I have a VI and found similar in Forums. I need to get the key to the bottom of the event, when the focus is not on VI. I have attached the VI found in the forum. Try clicking other windows, for example on the diagram of the VI, when VI is running an

  • New installation of Windows 8

    HP ENVY 17-j070ca notebook PC I want to install an ssd on my laptop, but met with many problems. To begin with, as a first step, he couldn't see the ssd. A ran diagnostics, its ok. Tried to reimage from an image I made of Windows backup on a WD MyBoo