サーチ…


SELECTステートメント

SELECTは、1つまたは複数のデータベーステーブルからデータオブジェクトデータを読み込むためのOpen-SQLステートメントです

  1. すべてのレコードを選択する

    * This returns all records into internal table lt_mara.
    SELECT * FROM mara
             INTO lt_mara.
    
  2. 単一レコードの選択

    * This returns single record if table consists multiple records with same key.
    SELECT SINGLE * INTO TABLE lt_mara
                    FROM mara
                    WHERE matnr EQ '400-500'.
    
  3. 識別レコードの選択

    * This returns records with distinct values.
    SELECT DISTINCT * FROM mara
                      INTO TABLE lt_mara
                      ORDER BY matnr.
    
  4. 集計関数

    * This puts the number of records present in table MARA into the variable lv_var 
    SELECT COUNT( * ) FROM mara
                      INTO lv_var.
    


Modified text is an extract of the original Stack Overflow Documentation
ライセンスを受けた CC BY-SA 3.0
所属していない Stack Overflow