- 1、本文档共34页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据库基本查询语句汇总(Summary of database basic query statements)
数据库基本查询语句汇总(Summary of database basic query statements)
In this statement
All the CXL
Its just a name, you can replace it with any name
Ps: Im QQ512842933 if you have any questions. Its all manual input, not reprinted
Create unique constraints (adding information cannot be repeated, which is the only constraint)
The alter table CXL
Add the constraint aa
Unique (idcare)
Create the check constraint statement
The alter table CXL
Add the constraint aa
Check (tel like 0734 - [0-9] [0-9] [0-9])
Create default constraint default
The alter table CXL
Add the constraint aa
Default I love you for name
Add foreign key constraints
The alter table CXL
Add the constraint fk1 - fk
Foreign key ()
The references table2 ()
Delete the foreign key constraint
The alter table CXL
Drop constraint fk -- this fk is the name you picked when you created the foreign key
Add the primary key constraint
The alter table CXL
Add the constraint pk
Primary key ()
To change the primary key
-- - first remove the existing primary key and then change the primary key (setting up the primary key cannot be empty, cannot duplicate data)
Set up the view
Create a view v
The as
Select * from CXL
The where
Modify the view
Alter the view v
The as
Select the name, age from CXL
The where
Update view record
The update v
Set name = expression -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -mac -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Delete data record
The delete from v where
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
/ * TRUNCATE TABLE: delete the content, release the space, but not delete the definition.
DELETE TABLE: DELETE the content not to DELETE the definition, do not release the space.
DROP TABLE: delete content and definitions, and release space. *
您可能关注的文档
- 广州到成都 重庆小轿车托运公司,商品车托运公司,托运公司,小汽车托运(Guangzhou to chengdu chongqing small car consignment company, commodity car shipping company, shipper company, car consigned).doc
- 广州十大手信(Guangzhou ten big hand letter).doc
- 广州市2010模拟试题数学(Guangzhou 2010 simulation test mathematics).doc
- 广州新白云机场冲孔桩施工难题及技术措施(Construction difficulties and technical measures of punch pile in guangzhou new baiyun airport).doc
- 广州市郊区发展与旧城改造(Guangzhou suburb development and old city reconstruction).doc
- 广州押韵(Guangzhou rhyme).doc
- 广州气候资料(Climatological information for guangzhou).doc
- 广州珠江电厂300MW汽轮机通流(Guangzhou zhujiang power plant 300MW turbine flow).doc
- 广州红门告诉你停车场智能管理系统的应用和厂家设计报价(Guangzhou hongmen tells you the application of the intelligent management system in parking lot and the manufacturer's design quotation).doc
- 广州高校汽车知识邀请赛初赛试卷题目及其答案(Question and answer of the preliminary examination paper of guangzhou university automobile knowledge invitational competition).doc
最近下载
- 2023-2024学年浙江省杭州市八区县小升初数学试卷(解析版).docx
- TCECS 1240-2023 弃土场工程技术规程.docx VIP
- 《中国建筑的特征》课件(共47张PPT)统编版高中语文必修下册.pdf VIP
- 2025年全国航空航天模型锦标赛竞赛规则.pdf VIP
- 最后一片叶子英文剧本.docx
- 地下铁道施工技术课件:基坑的围护结构-排桩.ppt VIP
- 高中地理选择性必修2全册各章节课时练习题及章末综合测验 含解析.pdf VIP
- 小时工劳务合同范本(2024版).docx
- 湖北工业大学2023-2024学年第2学期《高等数学(下)》期末试卷(A卷)附标准答案.pdf
- 河道开挖工程施工组织设计(184页).docx VIP
文档评论(0)