如何僅從Sybase(Adaptive Server Enterprise/15.7.0)表中僅列出幾列?以下是Sybase bcp幫助屏幕。它不接受SQL作爲輸入。我想列出許多表的唯一索引的所有列。還是有其他方法嗎?如何生成幾列而不是所有列? (Sybase)
usage: bcp [[db_name.]owner.]table_name[:slice_num] [partition pname] {in | out} [filename] [-m maxerrors] [-f formatfile] [-e errfile] [-d discardfileprefix] [-F firstrow] [-L lastrow] [-b batchsize] [-n] [-c] [-t field_terminator] [-r row_terminator] [-U username] [-P password] [-I interfaces_file] [-S server] [-a display_charset] [-z language] [-v] [-i input_file] [-o output_file] [-A packet size] [-J client character set] [-T text or image size] [-E] [-g id_start_value] [-N] [-W] [-X] [-M LabelName LabelValue] [-labeled] [-K keytab_file] [-R remote_server_principal] [-C] [-V [security_options]] [-Z security_mechanism] [-Q] [-Y] [-y sybase directory] [-x trusted.txt_file] [--clienterr errfile] [--maxconn maximum_connections] [--show-fi] [--hide-vcc] [--colpasswd [[[db_name.[owner].]table_name.]column_name [password]]] [--keypasswd [[db_name.[owner].]key_name [password]]] [--initstring ASE initialization string] [--quoted-fname]
的版本是Adaptive Server Enterprise/15.7.0/EBF 20305 SMP ESD#01 Refresh#2/P/x86_64/Enterprise Linux//2927/64-bit/FBO/Fri Jun 22 09:38:01 2012
創建FORMATFILE並將其提供給'-f'參數...?至少這是它在sybase的姐妹數據庫SqlServer中的工作方式:http://msdn.microsoft.com/en-us/library/aa337558%28SQL.90%29.aspx – rene
當bcp出來時,可以使用格式文件嗎? – ca9163d9
是啊,我無法想象爲什麼它不應該,但我想成爲DBA(又名開發人員),所以我可能會誤會...... – rene