Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Adding Row in existing table (SQL Server 2005)


  • Please log in to reply
1 reply to this topic

#1 daredavel

daredavel

  • Members
  • 25 posts
  • OFFLINE
  •  
  • Local time:02:18 PM

Posted 12 August 2016 - 08:20 AM

Hello,

 

I want to add another row in my existing table and I'm a bit hesitant if I'm doing the right thing because it might skew the database. I have my script below and would like to hear your thoughts about it.

 

I want to add another row for 'Jane' in the table, which will be 'SKATING" in the ACT column.

 

Table: [Emp_table].[ACT].[LIST_EMP]

SQL.png

 

My script is:

 

INSERT INTO [Emp_table].[ACT].[LIST_EMP]
([ENTITY],[TYPE],[EMP_COD],[DATE],[LINE_NO],[ACT],[NAME])

VALUES
('REG','EMP','45233','2016-06-20 00:00:00:00','2','SKATING','JANE')

 

Will this do the trick? Thank you



BC AdBot (Login to Remove)

 


#2 KingDavidlll

KingDavidlll

  • Members
  • 297 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:04:18 PM

Posted 12 August 2016 - 09:25 PM

Looks all good.  I can't say 100% whether it is good as not sure what the types are of those fields.

 

To be honest unless you're working on a live system just try it.  If you are then clone the database (dump and reload into a new one), then try it and see if you're happy with the result.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users