Click here to Skip to main content
15,896,915 members
Home / Discussions / Database
   

Database

 
GeneralStored Proc and SqlDataAdapter Pin
ccosser2-Dec-04 22:03
ccosser2-Dec-04 22:03 
GeneralAttaching a database to MSDE Pin
mattie202-Dec-04 20:31
mattie202-Dec-04 20:31 
GeneralNested Transaction with SQL Server Pin
Wouter van Eck2-Dec-04 5:21
Wouter van Eck2-Dec-04 5:21 
QuestionHow can i avaoid negative values in SQL? Pin
john kuruvila2-Dec-04 5:14
john kuruvila2-Dec-04 5:14 
AnswerRe: How can i avaoid negative values in SQL? Pin
Colin Angus Mackay2-Dec-04 6:42
Colin Angus Mackay2-Dec-04 6:42 
GeneralRe: How can i avaoid negative values in SQL? Pin
john kuruvila2-Dec-04 7:30
john kuruvila2-Dec-04 7:30 
Generalnot allowing negative values Pin
sujithapril2-Dec-04 5:10
sujithapril2-Dec-04 5:10 
GeneralRe: not allowing negative values Pin
Colin Angus Mackay2-Dec-04 6:41
Colin Angus Mackay2-Dec-04 6:41 
When you create the table you set a constraint like this:
CREATE TABLE cust_sample
    (
    cust_id                int        PRIMARY KEY,
    cust_name            char(50),
    cust_address            char(50),
    cust_credit_limit    money,
    CONSTRAINT chk_id CHECK (cust_id BETWEEN 0 and 10000 )
    )
If the table is already created you can use ALTER TABLE in order to add the constraint (See the SQL Help files for how to use ALTER TABLE)

Does this help?


Do you want to know more?
WDevs.com - Member's Software Directories, Blogs, FTP, Mail and Forums


GeneralRe: not allowing negative values Pin
sujithapril2-Dec-04 7:23
sujithapril2-Dec-04 7:23 
GeneralRe: not allowing negative values Pin
Colin Angus Mackay2-Dec-04 7:26
Colin Angus Mackay2-Dec-04 7:26 
GeneralRe: not allowing negative values Pin
sujithapril2-Dec-04 7:50
sujithapril2-Dec-04 7:50 
GeneralRe: not allowing negative values Pin
Colin Angus Mackay2-Dec-04 7:59
Colin Angus Mackay2-Dec-04 7:59 
GeneralRecordset "LIKE" filter of a number column Pin
Menny Even Danan1-Dec-04 21:51
Menny Even Danan1-Dec-04 21:51 
GeneralRe: Recordset "LIKE" filter of a number column Pin
jlawren72-Dec-04 5:27
jlawren72-Dec-04 5:27 
Generalcan't DELETE records in excel Pin
scoroop1-Dec-04 11:15
scoroop1-Dec-04 11:15 
GeneralRe: can't DELETE records in excel Pin
Christian Graus1-Dec-04 12:27
protectorChristian Graus1-Dec-04 12:27 
GeneralRe: can't DELETE records in excel Pin
scoroop1-Dec-04 12:36
scoroop1-Dec-04 12:36 
GeneralRe: can't DELETE records in excel Pin
jonathan152-Dec-04 23:21
jonathan152-Dec-04 23:21 
GeneralRe: can't DELETE records in excel Pin
scoroop3-Dec-04 2:38
scoroop3-Dec-04 2:38 
GeneralErr -2147467259: Operation must use an updatable query. Pin
Khang Nguyen1-Dec-04 10:23
Khang Nguyen1-Dec-04 10:23 
GeneralRe: Err -2147467259: Operation must use an updatable query. Pin
Edbert P1-Dec-04 10:34
Edbert P1-Dec-04 10:34 
GeneralRe: Err -2147467259: Operation must use an updatable query. Pin
Khang Nguyen2-Dec-04 4:21
Khang Nguyen2-Dec-04 4:21 
GeneralRe: Doing LIKE for a numeric column Pin
Boaz V1-Dec-04 5:14
Boaz V1-Dec-04 5:14 
GeneralDoing LIKE for a numeric column Pin
Menny Even Danan1-Dec-04 4:46
Menny Even Danan1-Dec-04 4:46 
GeneralRe: Doing LIKE for a numeric column Pin
lisoft3-Dec-04 15:15
lisoft3-Dec-04 15:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.