A couple of queries in SQL,Please Help..
-
Hai, The following is my queries. 1: Is it possible to have check constraint with a local variable? 2: Given the following scenario: I have three columns in a table ,say ID int,name varchar, address varchar, and I added 10 records into that table keeping ID colums NULL.Later I want to add values to ID columns 1 thru 10 but with a single update query.(It doesn't means you are bound to use only 1 satement in the batch, no loop permitted ) Please show me a right way.Thanks very much. Thank You, Rahul.P.Menon.
-
Hai, The following is my queries. 1: Is it possible to have check constraint with a local variable? 2: Given the following scenario: I have three columns in a table ,say ID int,name varchar, address varchar, and I added 10 records into that table keeping ID colums NULL.Later I want to add values to ID columns 1 thru 10 but with a single update query.(It doesn't means you are bound to use only 1 satement in the batch, no loop permitted ) Please show me a right way.Thanks very much. Thank You, Rahul.P.Menon.
just use cursor or while loop in urs stored procedure.
-
just use cursor or while loop in urs stored procedure.
Hi Goyal, Can you please explain with an example or with the code snippet.Thanks very much for the reply. Thank You, Rahul.P.Menon.
-
Hi Goyal, Can you please explain with an example or with the code snippet.Thanks very much for the reply. Thank You, Rahul.P.Menon.