| Author |
Topic  |
|
|
jaroot
Starting Member
46 Posts |
Posted - 01/05/2006 : 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 - 01/05/2006 : 12:05:16
|
| BTW: ALT-F4 actually closes SQL all together.. so don't try it :) |
 |
|
|
Srinika
Flowing Fount of Yak Knowledge
Sri Lanka
1378 Posts |
Posted - 01/05/2006 : 12:19:00
|
What is ur client ? Query Analyzer ? ASP ? VB ? Java ?
I don't know about keyboard shortcuts but If 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 & h
if u want to purposely put Null into a field u can use Insert 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 - 01/05/2006 : 15:59:58
|
SQL 2K..
My issue is that I'm testing on an already existing date field, and I need to "reset" the record if you will by NULL'ing out the date field. |
 |
|
|
Srinika
Flowing Fount of Yak Knowledge
Sri Lanka
1378 Posts |
Posted - 01/05/2006 : 16:29:41
|
U have a table and u want to change some field content to Null ?
Update urTable set urDateOrAnyField = Null where urCondition Run 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
India
394 Posts |
Posted - 01/05/2006 : 23:39:03
|
Are you trying entering it thru Enterprise Manager? then try ctrl + 0 (zero) |
 |
|
|
madhivanan
Premature Yak Congratulator
India
22460 Posts |
Posted - 01/06/2006 : 00:45:00
|
Dont try to update the column thru EM, use query analyser with Update query
Madhivanan
Failing to plan is Planning to fail |
 |
|
|
Yossi Bressler
Starting Member
2 Posts |
Posted - 08/30/2010 : 05:22:14
|
| Use Ctrl + 0 |
 |
|
|
madhivanan
Premature Yak Congratulator
India
22460 Posts |
Posted - 08/31/2010 : 05:46:34
|
quote: Originally posted by Yossi Bressler
Use Ctrl + 0
Ok. Read my previous answer
Madhivanan
Failing to plan is Planning to fail |
 |
|
|
Yossi Bressler
Starting Member
2 Posts |
Posted - 08/31/2010 : 13:25:11
|
Madhivanan, Some how I miss it. Sorry. Why to avoid update the column thru EM? Thanks |
 |
|
|
madhivanan
Premature Yak Congratulator
India
22460 Posts |
Posted - 09/01/2010 : 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 available
Madhivanan
Failing to plan is Planning to fail |
 |
|
|
Lumbago
Norsk Yak Master
Norway
3241 Posts |
Posted - 09/01/2010 : 06:17:35
|
This is a 4 year old topic!!
- Lumbago
My blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
| |
Topic  |
|