SÜTUNLARı GÖSTER
Şunun için geçerlidir: Databricks SQL denetimi yes Databricks Runtime
Tablodaki sütunların listesini döndürür. Tablo yoksa, bir özel durum oluşturulur.
Sözdizimi
SHOW COLUMNS { IN | FROM } table_name [ { IN | FROM } schema_name ]
Not
ve anahtar sözcükleri IN
FROM
değiştirilebilir.
Parametre
-
Tabloyu tanımlar. Ad , zamana bağlı belirtim içermemelidir.
-
bir şema adıyla nitelemenin
table_name
isteğe bağlı alternatif bir aracıdır. Bu parametre belirtildiğinde tablo adı farklı bir şema adıyla nitelenmemelidir.
Örnekler
-- Create `customer` table in the `salessc` schema;
> USE SCHEMA salessc;
> CREATE TABLE customer(
cust_cd INT,
name VARCHAR(100),
cust_addr STRING);
-- List the columns of `customer` table in current schema.
> SHOW COLUMNS IN customer;
col_name
---------
cust_cd
name
cust_addr
-- List the columns of `customer` table in `salessc` schema.
> SHOW COLUMNS IN salessc.customer;
col_name
---------
cust_cd
name
cust_addr
-- List the columns of `customer` table in `salesdb` schema
> SHOW COLUMNS IN customer IN salessc;
col_name
---------
cust_cd
name
cust_addr