Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-11-30 : 09:10:17
|
| Dear All,Today i was working with my database,when i get insert a row to a table always only one row get inserted.I am not sure why it is behaving like this.Any help.. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-11-30 : 09:26:07
|
| Eh...what do you mean by that? when you insert a row to table, how many row do you expect it to return? |
 |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-11-30 : 09:26:40
|
| HiMay be am not sure you can check SET ROWCOUNT SET ROWCOUNT 0Then run the SELECT query.-------------------------R... |
 |
|
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-11-30 : 09:34:44
|
| Hi Visakh, Even when i insert multiple records(rows),when i select i used to get only one row.After running SET ROWCOUNT 0 its returning all the rows.Thanks a lot rajdaksha.. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-11-30 : 09:39:57
|
quote: Originally posted by gangadhara.ms Hi Visakh, Even when i insert multiple records(rows),when i select i used to get only one row.After running SET ROWCOUNT 0 its returning all the rows.Thanks a lot rajdaksha..
oh...i think somebody set rowcount value to 1 which caused this |
 |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-11-30 : 09:43:24
|
quote: Originally posted by gangadhara.ms Hi Visakh, Even when i insert multiple records(rows),when i select i used to get only one row.After running SET ROWCOUNT 0 its returning all the rows.Thanks a lot rajdaksha..
WelCome -------------------------R... |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-30 : 09:51:28
|
quote: Originally posted by gangadhara.ms Hi Visakh, Even when i insert multiple records(rows),when i select i used to get only one row.After running SET ROWCOUNT 0 its returning all the rows.Thanks a lot rajdaksha..
This is why you should check it by select count(*) from your_tablein case if rowcount is set to some numberMadhivananFailing to plan is Planning to fail |
 |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-11-30 : 09:57:16
|
| HiYes we can also use SELECT COUNT(*) FROM <table_name>thanks madhi..-------------------------R... |
 |
|
|
|
|
|