473,383 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

add constrain in exsiting table

karthickkuchanur
156 100+
Please help me how rename my column and add contrain to my table

I have tried alter but i cant able to add constrain
Sep 5 '09 #1
1 2145
debasisdas
8,127 Expert 4TB
To rename a column in an existing table, the ALTER TABLE syntax is:

Expand|Select|Wrap|Line Numbers
  1.     ALTER TABLE table_name
  2.      RENAME COLUMN old_name to new_name;
note ---it supports Oracle 9i Release 2 onwards


to add a constraint try the following sample syntax
Expand|Select|Wrap|Line Numbers
  1. ALTER TABLE order_status2
  2. ADD CONSTRAINT order_status2_id_ck CHECK (id > 0);
Sep 5 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Phil | last post by:
I am using MySQL 4.1.1-1. When I add a "named" foreign key constraint alter table sb_query_nm_sub_tp add constraint f1sbquerynmsubtp foreign key (query_nm) references sb_query_class...
6
by: J. VerSchave | last post by:
I have a bunch of images that are 600x800 800x600 640x480 480x640 I want to use HTML to contrain the size of these images. I basically want to display them as thumnails. Here is what I am...
1
by: Shmulik | last post by:
Is there a way to constrain a Generics class to only accept specific value types, for instance, lets say I want to create a Histogram class that could accept the types int, float, double, etc.,...
8
by: Hei | last post by:
Hi, any ideas how to constrain the numbers of item can check in CheckListBox. i would force user can only check one item. thx William
1
by: Konda | last post by:
Hi All, I have a problem with DataSet while adding a new row into dataset by another dataset. My assignment is Adding and Removeing from Two Grids. I want to add a row into new Grid2 when i...
1
by: Mangler | last post by:
I need a quick suggestion on the best way to accomplish the below: A user can update a record in the db on the front end so.... if this is the first entry they input the value and submit it.......
1
by: lee1212 | last post by:
Hi I use vb.Net to open an access db for my software and i have one issue that i don't know how to do, I need to change an exsiting Column that might have some records in it from Text(250) to Memo...
2
oll3i
by: oll3i | last post by:
how to constrain a collection so it takes only strings
1
by: skoggins | last post by:
Hi all, I am using an Ajax based resizable table on this page: http://connectnote-dev.com/accounts/testpage Works great in FF but in IE6, if the column widths are increased too much then...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.