Solved

Editing Data in tables

Posted on 1998-12-03
3
167 Views
Last Modified: 2010-03-19
This is one of my first times working with SQL. We are using 6.5 and I need to edit and add so data to fields in the tables in the database.
0
Comment
Question by:Yogi012398
  • 2
3 Comments
 
LVL 2

Expert Comment

by:tschill120198
ID: 1092059
What is it you want specifically... syntax?  Do these tables you want to edit/add already exist?
0
 

Author Comment

by:Yogi012398
ID: 1092060
I need to edit and add data in existing tables.
0
 
LVL 2

Accepted Solution

by:
tschill120198 earned 20 total points
ID: 1092061
Ok... assuming Table1 is the table, here's the general syntax (substitute your column names as needed).  If this isn't clear, you could describe one of your tables to me (tablename + columnnames) and we'll use that...

Add syntax-
insert table1 (
    column1,
    column2,
    column3
) values (
    'NewValue1',
    'NewValue2',
    'NewValue3'
)
go

Edit syntax-
update table1
set    Column1Name = 'ChangedValue',
       Column2Name = 'ChangedValue'
where  TableKey = 1

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now