Solved

Editing Data in tables

Posted on 1998-12-03
3
183 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

856 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