sql_查询select

  • A+
所属分类:mssql
摘要

sql _ delete 删除sql_insert写入sql_update 修改sql_alter table 列_增加

[摘要]本文是对sql_查询select的讲解,对学习SQL编程技术有所帮助,与大家分享。

sql_查询select


/****** Script for SelectTopNRows command from SSMS  ******/
SELECT TOP 1000 [r_gonghao]
      ,[r_mingzi]
      ,[r_bumen]
      ,[r_xingbie]
  FROM [moge].[dbo].[renyuanxinxi]

sql _ delete 删除

USE [moge]
GO

DELETE FROM [dbo].[renyuanxinxi]
      WHERE r_gonghao=683
GO

sql_insert写入

USE [moge]
GO

INSERT INTO [dbo].[renyuanxinxi]
           ([r_gonghao]
           ,[r_mingzi]
           ,[r_bumen]
           ,[r_xingbie])
     VALUES
      ('683', '张三', '人力资源部', '男')

sql_update 修改

USE [moge]
GO

UPDATE [dbo].[renyuanxinxi]
   SET [r_gonghao] = 683
      
 WHERE [r_gonghao]=624
GO

sql_alter table 列_增加

/****** Script for SelectTopNRows command from SSMS  ******/
alter table.[renyuanxinxi] add aa_1 int

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: