アウトプットができる技術者に

it's a time to take a new step !

2014-02-01から1日間の記事一覧

Sybase ASE 入門 delete文で from句を利用する

例 テーブル ts1の内容を ts2の内容を参照して 削除する delete ts1 from ts1 a, ts2 b where a.id = b.id 注意 from句で副問い合わせは利用不可 where句にexistsは利用可 reference official Transact-SQL User's Guide Sybase ASE 入門 目次

Sybase ASE 入門 日付と時刻の関数

日付と時刻の出力 current_bigdatetime() getdate() current_date() current_time() current_bigtime() select current_date() ---------------------------------- Feb 1 2014 10:40:52.606274PM select get_date() ------------------------------- Feb 1 …

Sybase ASE 入門 case-sensitive

Sybase ASE は 初期設定では case-sensitive 大文字と小文字を区別します。 これは Serverの設定なので、例えば、DB毎やコネクションごとには変更できない。 変更するには、Serverの文字セットを変えればよいみたいです。 文字コードの変更 下記で変更可能/o…

Sybase ASE 入門 update

contents update文で from句を利用する reference Sybase ASE 入門 目次

Sybase ASE 入門 update文で from句を利用する

例 テーブル ts1の内容を ts2 の内容に updateする update ts1 set a.name = b.name from ts1 a, ts2 b where a.id = b.id 注意 from句で副問い合わせは使用不可 reference official Transact-SQL User's Guide Sybase ASE 入門 目次

Sybase ASE 入門 in句のサブクエリは1カラムのみ

SybaseASEではin句の指定は1カラムのみのようだ。 まぁ、select文なら join すればいいんですけどね。 OK select id, type, name from ti where (id) in (select id from ti2) NG select id from ti where (id, type) in (select id, type from ti2) join で…

Sybase ASE 入門 isql 対話型 Utility

isqlはsybase aseのクライアントutlityです。 sybase aseに接続して Transact-SQL を発行できます。パス $SYBASE/$SYBASE_OCS/bin -> /opt/sybase/OCS-15_0/bin 使い方 引数にいろいろ指定して、DBに接続 実行時には最後に「go」を書く quit / exit で終了 i…