溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

mysql遷移到sybase ase中null問題怎么處理

發布時間:2021-11-06 14:24:44 來源:億速云 閱讀:220 作者:小新 欄目:MySQL數據庫

這篇文章將為大家詳細講解有關mysql遷移到sybase ase中null問題怎么處理,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。

[root@testlihb ~]# su - mysql
-bash-4.1$ mysql -uroot -p********* -h227.0.0.1 -P3306


mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)


mysql> use test
Database changed
mysql> create table t ( a int,b int);
Query OK, 0 rows affected (0.65 sec)


mysql> insert into t values (1,null);
Query OK, 1 row affected (0.09 sec)


mysql> insert into t values (null,1);
Query OK, 1 row affected (0.10 sec)


mysql> select * from t;
+------+------+
| a    | b    |
+------+------+
|    1 | NULL |
| NULL |    1 |
+------+------+
2 rows in set (0.00 sec)


mysql> 
mysql> select ifnull(a,'') as a,ifnull(b,'') as b from t into outfile '/tmp/t.txt';
Query OK, 2 rows affected (0.00 sec)


mysql> 
mysql> 
mysql> ^DBye
-bash-4.1$ 
-bash-4.1$ 
-bash-4.1$ id
uid=27(mysql) gid=27(mysql) groups=27(mysql)
-bash-4.1$ logout
[root@testlihb ~]# su - sybase




[sybase@testlihb ~]$ isql -Usa -P**** -SASE -w999
1> use tempdb
2> go


1> create table t (a int null,b int null)
2> go
1> select * from tempdb..t
2> go
 a           b           
 ----------- ----------- 


(0 rows affected)
 
[sybase@testlihb ~]$ bcp tempdb..t in /tmp/t.txt -Usa -SASE -P***** -c


Starting copy...


2 rows copied.
Clock Time (ms.): total = 117  Avg = 58 (17.09 rows per sec.)
[sybase@testlihb ~]$ 
[sybase@testlihb ~]$ isql -Usa -P***** -SASE -w999
1> select * from tempdb..t
2> go
 a           b           
 ----------- ----------- 
           1        NULL 
        NULL           1 


(2 rows affected)
1> 
2> select * from tempdb..t where b is null
3> go
 a           b           
 ----------- ----------- 
           1        NULL 


(1 row affected)
1> 

關于“mysql遷移到sybase ase中null問題怎么處理”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女