- 3
- 0
- 约8.62千字
- 约 19页
- 2018-06-05 发布于江西
- 举报
chapter查寻数据(Chapter search data).doc
chapter2查寻数据(Chapter2 search data)
Single line notes
Multi line comment / * * /
The first step: create database niitdb / *
Database file contains:
Master data file: niitdb.mdf
Log file: niitdb_log.ldf
The second step is to separate database, add database, backup and restore database
Establishing D:\Datsbase
Third steps:
Create student table
StuNo StuName age sex address
Common data types:
Values: int 1,2,3............
Short numerical type: smallInt
Long numerical type: bigInt
Decimal point (floating point, single precision):float--3.14
Double precision: double--3.1415926533348
Character type: char--a,b,1
String: string-- abkei
Sql: structured query language (struct query language)
Server: (service)
P1.4
Business procedures may have three elements
…………
* /
-- execute the SQL statement
--1, using database
Grammar:
--use database
--go
Example:
Use niitdb
Go
Select *
From Student
A set of custom columns, column chart, header information (three kinds)
--select column names 1, column names 2, column names 3,... Names n
--from table name
Select StuNo as ID , name address= StuName address
From dbo.Student
- two, connector characters
Select Student.StuNO, Student.StuName, , Student.sex = description of gender:
From Student
INT turns into CHAR:convert function
Select StuName+age:+CONVERT (char (4), age) + old + as description address:+address
From Student
Select StuName+age:+CONVERT (char (4), age) + old + minus 10 years after+CONVERT (char (4), age-10) + as description address:+address
From Student
Any number and ratio of numerical values, the result is itself.
Select StuName+age:+CONVERT (char (4), age%300) + old + as description address:+address
From Student
Select specific rows
--1, comparison operator
Not equal to =!
Select * from Student where age=30
Select * from Student where age30
--2, arithmetic operator
- + - * /%
/*3, logical operator
Not and and or / or negative
Select * from Student
Where StuName=jordanand age 40
Select * from Student
Where StuName=jordanor St
您可能关注的文档
- 代工巨头的劳管理动力拐点(The dynamics of labor management dynamics in OEM giants).doc
- 新编大学英语视听说教程第一册.doc
- 石油北京秋《机械电气安全技术含课程设计》第二阶段在线作业.doc
- 清华考研_电路原理课件_第章__电路的频率特性.docx
- 精细化,客车制造工艺走势发展(Refinement, development trend of bus manufacturing technology).doc
- 2016年厦门市会计从业资格考试《财经法规与会计职业道德》专用教材【考纲分析+考点精讲+真题演练+强化习题】.doc
- 国际经济学(第六版)课后习题答案.doc
- 世纪大学英语读写教程教案.doc
- 做人与做事(字)作文.doc
- 会计专业教学计划与教学大纲(高级工).doc
- 2025年全国演出经纪人员资格认定考试试卷带答案(研优卷).docx
- 2025年全国演出经纪人员资格认定考试试卷完整版.docx
- 2025年全国演出经纪人员资格认定考试试题库及完整答案.docx
- 2025年全国演出经纪人员资格认定考试试卷完美版.docx
- 2025年全国演出经纪人员资格认定考试试卷含答案(实用).docx
- 2025年全国演出经纪人员资格认定考试试卷及答案(各地真题).docx
- 2025年下半年内江市部分事业单位公开考试招聘工作人员(240人)备考题库附答案.docx
- 2025年全国演出经纪人员资格认定考试试卷及答案1套.docx
- 2025年下半年四川成都市郫都区面向社会引进公共类事业单位人员2人备考题库最新.docx
- 2025年下半年内江市部分事业单位公开考试招聘工作人员(240人)备考题库附答案.docx
最近下载
- 《婴幼儿回应性照料》教案 项目五 19~36月龄幼儿教育活动的设计与指导.pdf VIP
- S7-1200PLC应用技术项目教程 项目一 认识S7-1200PLC.pptx VIP
- 三国志袁绍传2022国庆节3版攻略.pdf VIP
- 2022《蒙氏教育理念下的幼儿园教室环境创设》研究报告14000字.doc VIP
- 《婴幼儿回应性照料》教案 第二讲 婴幼儿营养与喂养的回应性照料.pdf VIP
- 《2025年陕西省事业单位招聘考试综合类职业能力倾向测验真题试卷》.docx VIP
- 《2025年陕西省事业单位招聘考试综合类职业能力倾向测验真题试卷》.docx VIP
- 《婴幼儿回应性照料》教案 第五讲 婴幼儿心理发展的回应性照料.pdf VIP
- 《婴幼儿回应性照料》教案 第八讲 婴幼儿回应性照料评估.pdf VIP
- 事业单位招聘考试综合类职业能力倾向测验强化训练试卷》.docx VIP
原创力文档

文档评论(0)