当前位置:网站首页>SQL statement to view the basic table structure and constraint fields, primary codes and foreign codes in the table (simple and effective)
SQL statement to view the basic table structure and constraint fields, primary codes and foreign codes in the table (simple and effective)
2022-06-10 19:13:00 【_ xwh】
①exec sp_helpconstraint ‘ Table name ’: You can query various constraint attributes in the table ( Field ), Including the ability to view which field in the table is foreign code 、 Main code 、 The scope of the property
②sp_help + Table name or sp_columns + Table name : View elements and basic structure in the table
③ To query the data inserted in the basic table, you can use :
select * from table
and select * from table t where t.id=(select last_insert_id()) You can rely on the key code to query a single specific data , Here t.id It's a watch t The main code in ( Because the query is completed by the main code ),t.id Followed by the corresponding main code value in the inserted data .
边栏推荐
- Db2 SQL PL的动态SQL
- Nodejs judge system type get host name execute console command Chinese garbled code
- Adobe Premiere基础-工具使用(选择工具,剃刀工具,等常用工具)(三)
- Low carbon data center construction ideas and future trends
- MySQL高级篇第一章(linux下安装MySQL)【上】
- [Code] neural symbol generation machine
- Win32-子窗口-父窗口-窗口所有者
- libcurl 7.61.0 VS2013 编译教程
- Live broadcast preview | a new era of social interaction, exploring new social experiences in the universe
- AgI foundation, uncertain reasoning, subjective logic Ppt1
猜你喜欢

Three ways generated by stream lambda

Chapter 1 SQL operators

Adobe Premiere Foundation (the last step of video subtitle adding) (6)

5. golang generics and reflection

What are the current mainstream all-optical technology solutions- Part II

Vcsa7u3c installation tutorial

Chapter II data type (I)

Upgrade the playing method of snatching singing, integrate the climax clips of genuine music and real-time scoring ability~

Adobe Premiere基础-不透明度(混合模式)(十二)

Data URL
随机推荐
Adobe Premiere Basic - tool use (select tools, rasoir tools, and other Common Tools) (III)
libcurl 7.61.0 VS2013 编译教程
单纯形法代码求解(含超详细代码注释和整个流程图)
AgI foundation, uncertain reasoning, subjective logic Ppt1
[kuangbin] topic 22 interval DP
Use of uiautomator2 automated test tool
基于谱加权的波束方向图分析
5. golang generics and reflection
Opencv does not rely on any third-party database for face detection
WordPress 6.0 “Arturo阿图罗” 发布
C (pointer-02)
nodejs-基本架构分析-解析引擎目录-插件安装-核心模块
Upgrade the playing method of snatching singing, integrate the climax clips of genuine music and real-time scoring ability~
Adobe Premiere基础(轨道相关)(五)
直播预告 | 社交新纪元,共探元宇宙社交新体验
[kuangbin] topic 12 basic DP1
Chapter IV data type (III)
Some summary about YUV format
New trends and prospects of data center planning and design under the background of "double carbon"
JS Touch