Author |
Topic |
jaroot
Starting Member
46 Posts |
Posted - 2006-01-05 : 11:56:13
|
Is there a keyboard shortcut to insert a <NULL> into a given SQL field?I th ought I read somewhere it was ALT-F4 but that doesn't seem to work.Thanks! |
|
jaroot
Starting Member
46 Posts |
Posted - 2006-01-05 : 12:05:16
|
BTW: ALT-F4 actually closes SQL all together.. so don't try it :) |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-01-05 : 12:19:00
|
What is ur client ? Query Analyzer ? ASP ? VB ? Java ?I don't know about keyboard shortcuts butIf its a query:if the table has fields (a,b,c,d,e,f,g,h)Insert into tbl (a,b,e,g) values('aa','bb','ee','gg')Inserts Null to all fields (if no defaults specified) not in the list - ie. for the fields c,d & hif u want to purposely put Null into a field u can useInsert into tbl (a,b,c,d) values('aa','bb',Null,Null)Inserts Null to all fields c & d and for the fields e,f,g & h as well |
|
|
jaroot
Starting Member
46 Posts |
Posted - 2006-01-05 : 15:59:58
|
SQL 2K.. My issue is that I'm testing on an already existing date field, and I need to "reset" the recordif you will by NULL'ing out the date field. |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-01-05 : 16:29:41
|
U have a table and u want to change some field content to Null ?Update urTable set urDateOrAnyField = Null where urConditionRun the proper statement on the query analyzer.If u tell us what ur table & field names and what u want to do as well, v can give the exact solution. |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2006-01-05 : 23:39:03
|
Are you trying entering it thru Enterprise Manager?then try ctrl + 0 (zero) |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-06 : 00:45:00
|
Dont try to update the column thru EM, use query analyser with Update queryMadhivananFailing to plan is Planning to fail |
|
|
Yossi Bressler
Starting Member
2 Posts |
Posted - 2010-08-30 : 05:22:14
|
Use Ctrl + 0 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-08-31 : 05:46:34
|
quote: Originally posted by Yossi Bressler Use Ctrl + 0
Ok. Read my previous answerMadhivananFailing to plan is Planning to fail |
|
|
Yossi Bressler
Starting Member
2 Posts |
Posted - 2010-08-31 : 13:25:11
|
Madhivanan,Some how I miss it. Sorry.Why to avoid update the column thru EM?Thanks |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-09-01 : 05:16:19
|
quote: Originally posted by Yossi Bressler Madhivanan,Some how I miss it. Sorry.Why to avoid update the column thru EM?Thanks
That is not a good practice. For large number of data, it will be very slow. Also it would throw error if you update an unique column value with a value which is already availableMadhivananFailing to plan is Planning to fail |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-09-01 : 06:17:35
|
This is a 4 year old topic!!- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
|
|
joeller
Starting Member
15 Posts |
Posted - 2014-06-27 : 11:52:06
|
Thank you shallu1_gupta and Yossi Bressler. I've been looking everywhere for that. @madhivanan, sometimes you just want to reset one value back to what is was at the beginning of the test. It is a major pain in the you know what to have to write a query each time.E.R. Joell MCDBA |
|
|
|