我有这个代码:
select a.id as tableid,
a.name as tableName,
b.name as columnName,
b.status as columnStatus,
b.type as columnType
from sysobjects a
LEFT JOIN syscolumns b
ON a.id = b.id
WHERE a.name = 'table_name'
Run Code Online (Sandbox Code Playgroud)
现在,columType显示数字.我想获取columnType的名称,该名称位于表'systypes'中的'name'列中.我怎么做?简单的LEFT JOIN将导致重复的行.
我在我的终端中运行这个命令:
tns doctor --log trace
Run Code Online (Sandbox Code Playgroud)
我得到了这个结果:
execFile: /Users/iyasilias/Library/Android/sdk/platform-tools/adb "help"
execFile: /Users/iyasilias/Library/Android/sdk/platform-tools/adb "help"
spawn: /Users/iyasilias/Library/Android/sdk/platform-tools/adb "--help"
Socket {
_connecting: false,
_hadError: false,
_handle:
Pipe {
bytesRead: 0,
_externalStream: {},
fd: 15,
writeQueueSize: 0,
owner: [Circular],
onread: [Function: onread],
reading: true },
_parent: null,
_host: null,
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: null,
ended: false,
endEmitted: false,
reading: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
defaultEncoding: 'utf8',
ranOut: …Run Code Online (Sandbox Code Playgroud)