Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    16

    Unanswered: Stored procedure

    Hello.

    I have a table and i want to take my values from that table and insert to another table.

    SELECT * from Table1 where 1=1;


    INSERT INTO Table2 VALUES(...The values from Table1)


    This is like a for statement.

    I have more than 1 rows and i am using a stored procedure.

    Are there any for-like statements for stored procedures in Sybase?

    Thanks...

  2. #2
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    You could just do

    select * into Table2
    from Table1

    or if you need select columns

    insert into Table2
    select col1, col2, etc from Table1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •