Q&A

  • 2828에대한 답변에서 질문
저는 오라클을 사용하여 프로그래밍을 하고 있습니다.

그리고 제가 알기로 SQL은 데이터 베이스에서 표준 언어로 알고 있거든요



그런데 2828에 대한 답변이 제가 알고 있는 것하고 틀린 것 같아서 질문하는 거예요



insert문 syntax :

insert into schema.table column(s) Values subquery



만일 create Table dept(deptno Number(5) Primary, Dname Varchar2(10) UNIQUE);

이런 식으로 table을 작성했을때 데이터 삽입할때의 SQL문은

insert into dept values(10,'executive');

아닌가요? 물론 이 것은 매우 잘 실행됩니다.

2  COMMENTS
  • Profile
    조복기 1999.06.26 20:42
    하남수 께서 말씀하시기를...

    > 저는 오라클을 사용하여 프로그래밍을 하고 있습니다.

    > 그리고 제가 알기로 SQL은 데이터 베이스에서 표준 언어로 알고 있거든요

    >

    > 그런데 2828에 대한 답변이 제가 알고 있는 것하고 틀린 것 같아서 질문하는 거예요

    >

    > insert문 syntax :

    > insert into schema.table column(s) Values subquery

    >

    > 만일 create Table dept(deptno Number(5) Primary, Dname Varchar2(10) UNIQUE);

    > 이런 식으로 table을 작성했을때 데이터 삽입할때의 SQL문은

    > insert into dept values(10,'executive');

    > 아닌가요? 물론 이 것은 매우 잘 실행됩니다.



    SQL문이 표준언어라고 하지만 각 RDB마다 조금씩의 차이점이 있습니다.

    오라클의 기능중 하나인 decode기능은

    다른 RDB에는 거의 없고

    sql-server에는 다른 명령으로 존재하죠..

    그리고 sql-server와 sybase는 거의 90%가 같다고 생각하죠..

    (같은뿌리에서 나왔는데도 조금씩 틀리네요)



    join쪽으로 가면 차이점이 더 큽니다.



    기본 select, insert, update문장도 마찬가지입니다..

    각 RDB제품들마다 차이점이 있죠..

    제가 요즘에 db쪽 프로그램을 하지않아서 예를 제대로 못들지만

    파라독스에서는 select나 inset시 테이블명에 "test.db"식으로

    줄수가 있지요..""는 있어도 되고 없어도되고..



    근데 질문한게 이거 맞나요?

  • Profile
    하남수 1999.06.26 20:36
    델피 도움말에 다음가 같은 글이 있군요. 찾아보지도 않고 질문을 했내

    그래도 한가지더 이상한 점은 SQL은 DB공용어로 알고 있는데 oracle에서 작성한 script하고

    델파이하고 틀리면 혼동이.....

    델파이에서 작성한 SQL문을 내용을 SQL*.dll이 바꿔주나......아직 모르겠음



    Adds one or more new rows of data in a table



    INSERT INTO table_reference



    [(columns_list)]

    VALUES (update_atoms)



    Description



    Use the INSERT statement to add new rows of data to a table.



    Use a table reference in the INTO clause to specify the table to receive the incoming data.



    The columns list is a comma-separated list, enclosed in parentheses, of columns in the table and is optional. The VALUES clause is a comma-separated list of update atoms, enclosed in parentheses. If no columns list is specified, incoming update values (update atoms) are stored in fields as they are defined sequentially in the table structure. Update atoms are applied to columns in the order the update atoms are listed in the VALUES clause. There must also be as many update atoms as there are columns in the table.



    INSERT INTO "holdings.dbf"



    VALUES (4094095, "BORL", 5000, 10.500, "1/2/1998")









    하남수 께서 말씀하시기를...

    > 저는 오라클을 사용하여 프로그래밍을 하고 있습니다.

    > 그리고 제가 알기로 SQL은 데이터 베이스에서 표준 언어로 알고 있거든요

    >

    > 그런데 2828에 대한 답변이 제가 알고 있는 것하고 틀린 것 같아서 질문하는 거예요

    >

    > insert문 syntax :

    > insert into schema.table column(s) Values subquery

    >

    > 만일 create Table dept(deptno Number(5) Primary, Dname Varchar2(10) UNIQUE);

    > 이런 식으로 table을 작성했을때 데이터 삽입할때의 SQL문은

    > insert into dept values(10,'executive');

    > 아닌가요? 물론 이 것은 매우 잘 실행됩니다.