search
HomeDatabaseMysql Tutorial Access入门教程7.3为表中的字段设置数据类型

Access入门教程7.3为表中的字段设置数据类型

Jun 07, 2016 pm 04:02 PM
accessGetting Started TutorialFielddatatypeset up

设置完主键 我们再看看字段的数据类型 在Access中有 文本 备注 数字 日期/时间 货币 自动编号 是/否 OLE对象 超级链接 查阅向导 十种数据类型 各种数据类型中输入的是不同的数据 在计算机中 数据有很多种类型 它们有着不同的用处 比如文本类型和备注类型 虽

    设置完主键我们再看看字段的数据类型在Access中有文本备注数字日期/时间货币自动编号是/否OLE对象超级链接查阅向导十种数据类型各种数据类型中输入的是不同的数据

    在计算机中数据有很多种类型它们有着不同的用处比如文本类型和备注类型虽然都是用来存储文本但是文本类型存储的字符数最多只能备注类型却可以存储个字符如果把备注类型换成文本类型则无法保存下全部的数据信息文本类型的数据存放在备注类型中又势必造成很大的浪费在Access中不同的数据类型分配不同大小的数据空间而每种数据类型的大小却是固定的所以当我们在一个字段中输入一个值时这个字段的大小不会随里面值的内容而变化如果输入一个字符A使用文本类型这个值空出来的字符空间不会很多但如果使用备注类型则会空出个字符空间这些空间不能再输入其它值的内容就白白浪费了

    不同类型的数据在使用时也有差别比如两个值数字类型中是数字文本类型中就是文本了如果将这两个值相加求和那么用数字类型计算出来的结果是而用文本类型相加的结果则是将两个数据联在一起成为可见它们的差别还是很大的

    现在我们已经知道了正确设置数据类型的重要性就开始为订单信息表中的各个字段设置数据类型吧先定义订单号字段的数据类型用鼠标单击订单号的数据类型方格内出现一个下拉箭头单击它在弹出的下拉列表框中选定自动编号就把这个字段的数据类型定为自动编号类型了自动编号类型的数据是从开始不重复的整数这样可以保证在表中的每个记录都可以区分开来所以一个表的主键常常建立在拥有这种数据类型的字段上订货单位货物名称经手人定义为文本类型货物单价订货金额定义为货币类型订货数量应是数字类型订货日期则是日期/时间类型关于不同的类型各自的特点我们将在课后补充中进行比较详细的讲解现在来看看修改过数据类型后的表表示钱数的地方都用标准的货币符号引出来了而且输入数字的地方也变的一目了然了


Access入门教程7.3为表中的字段设置数据类型

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MySQL BLOB : are there any limits?MySQL BLOB : are there any limits?May 08, 2025 am 12:22 AM

MySQLBLOBshavelimits:TINYBLOB(255bytes),BLOB(65,535bytes),MEDIUMBLOB(16,777,215bytes),andLONGBLOB(4,294,967,295bytes).TouseBLOBseffectively:1)ConsiderperformanceimpactsandstorelargeBLOBsexternally;2)Managebackupsandreplicationcarefully;3)Usepathsinst

MySQL : What are the best tools to automate users creation?MySQL : What are the best tools to automate users creation?May 08, 2025 am 12:22 AM

The best tools and technologies for automating the creation of users in MySQL include: 1. MySQLWorkbench, suitable for small to medium-sized environments, easy to use but high resource consumption; 2. Ansible, suitable for multi-server environments, simple but steep learning curve; 3. Custom Python scripts, flexible but need to ensure script security; 4. Puppet and Chef, suitable for large-scale environments, complex but scalable. Scale, learning curve and integration needs should be considered when choosing.

MySQL: Can I search inside a blob?MySQL: Can I search inside a blob?May 08, 2025 am 12:20 AM

Yes,youcansearchinsideaBLOBinMySQLusingspecifictechniques.1)ConverttheBLOBtoaUTF-8stringwithCONVERTfunctionandsearchusingLIKE.2)ForcompressedBLOBs,useUNCOMPRESSbeforeconversion.3)Considerperformanceimpactsanddataencoding.4)Forcomplexdata,externalproc

MySQL String Data Types: A Comprehensive GuideMySQL String Data Types: A Comprehensive GuideMay 08, 2025 am 12:14 AM

MySQLoffersvariousstringdatatypes:1)CHARforfixed-lengthstrings,idealforconsistentlengthdatalikecountrycodes;2)VARCHARforvariable-lengthstrings,suitableforfieldslikenames;3)TEXTtypesforlargertext,goodforblogpostsbutcanimpactperformance;4)BINARYandVARB

Mastering MySQL BLOBs: A Step-by-Step TutorialMastering MySQL BLOBs: A Step-by-Step TutorialMay 08, 2025 am 12:01 AM

TomasterMySQLBLOBs,followthesesteps:1)ChoosetheappropriateBLOBtype(TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB)basedondatasize.2)InsertdatausingLOAD_FILEforefficiency.3)Storefilereferencesinsteadoffilestoimproveperformance.4)UseDUMPFILEtoretrieveandsaveBLOBsco

BLOB Data Type in MySQL: A Detailed Overview for DevelopersBLOB Data Type in MySQL: A Detailed Overview for DevelopersMay 07, 2025 pm 05:41 PM

BlobdatatypesinmysqlareusedforvoringLargebinarydatalikeImagesoraudio.1) Useblobtypes (tinyblobtolongblob) Basedondatasizeneeds. 2) Storeblobsin Perplate Petooptimize Performance.3) ConsidersxterNal Storage Forel Blob Romana DatabasesizerIndimprovebackupupe

How to Add Users to MySQL from the Command LineHow to Add Users to MySQL from the Command LineMay 07, 2025 pm 05:01 PM

ToadduserstoMySQLfromthecommandline,loginasroot,thenuseCREATEUSER'username'@'host'IDENTIFIEDBY'password';tocreateanewuser.GrantpermissionswithGRANTALLPRIVILEGESONdatabase.*TO'username'@'host';anduseFLUSHPRIVILEGES;toapplychanges.Alwaysusestrongpasswo

What Are the Different String Data Types in MySQL? A Detailed OverviewWhat Are the Different String Data Types in MySQL? A Detailed OverviewMay 07, 2025 pm 03:33 PM

MySQLofferseightstringdatatypes:CHAR,VARCHAR,BINARY,VARBINARY,BLOB,TEXT,ENUM,andSET.1)CHARisfixed-length,idealforconsistentdatalikecountrycodes.2)VARCHARisvariable-length,efficientforvaryingdatalikenames.3)BINARYandVARBINARYstorebinarydata,similartoC

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.