Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

Editing Data in tables

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
Yogi012398
Asked:
Yogi012398
  • 2
1 Solution
 
tschill120198Commented:
What is it you want specifically... syntax?  Do these tables you want to edit/add already exist?
0
 
Yogi012398Author Commented:
I need to edit and add data in existing tables.
0
 
tschill120198Commented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now