doulun1915 2018-09-11 09:03
浏览 101

显示表中的所有列值

I want to show the all values from table. I know i can do that with

SELECT COLUMN_NAMES FROM TABLE_NAME WHERE COLUMN='VALUE'

But it is showing just wanted values i want all columns with the SHOW COLUMN query.

I have try it like this:

SHOW COLUMNS FROM lang 

then it gives me all details from the lang table. So if i want to show lang table id = '5' like the following query

SHOW COLUMNS FROM lang WHERE id='5'

then i am geting Unknown column 'id' in 'where clause'

Please look at the following shema it is like my table.

I want to show for example id=5 all information like id, key, english, turkish ect. Why i wanted this because if i add more then language like russian, germany ect. then i need to get also that language information in the result.

+------+----------------+---------------------+---------------------+
|  id  |      key       |     english         |   turkish           |
+------+----------------+---------------------+---------------------+
|  1   |       hi       |       Hi            |    Merhaba          |
+------+----------------+---------------------+---------------------+
|  2   |     profile    |      Profile        |    Profil           |
+------+----------------+---------------------+---------------------+ 
|  3   |      menu      |       Menu          |     Menü            |
+------+----------------+---------------------+---------------------+
|  4   |    forgot_pass |  Forgot Password    |  Şifremi Unuttum!   |
+------+----------------+---------------------+---------------------+
|  5   |    wellcome    |      Wellcome       |   Hoş geldiniz!     |
+------+----------------+---------------------+---------------------+
  • 写回答

1条回答 默认 最新

  • douzhi0107 2018-09-11 09:06
    关注

    Use SELECT * instead:

    SELECT * FROM lang where id = '5'
    
    评论

报告相同问题?

悬赏问题

  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?