Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Editing Data in tables

Posted on 1998-12-03
3
Medium Priority
?
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 80 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

721 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