更新test1将名称设置为主键(test1作为我的表名) [英] update test1 set name as Primary Key (test1 as my table name)

查看:88
本文介绍了更新test1将名称设置为主键(test1作为我的表名)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

但是它给出了一个错误,'as'的语法不正确......什么是正确的语法.... ??

任何身体请帮助我...







提前致谢

But it gives an error that incorrect syntax at 'as'...what is the correct syntax....??
Any body please help me...



Thanks in advance

推荐答案

更改您需要使用的表的主键定义 ALTER TABLE http: //www.w3schools.com/sql/sql_primarykey.asp [ ^ ]
To change the primary key definition for a table you need to use ALTER TABLE : http://www.w3schools.com/sql/sql_primarykey.asp[^]


SQL UPDATE命令是一种DML(数据操作语言)命令,用于更改数据而不是表结构...

您必须运行DDL(数据定义语言)命令 - ALTER TABLE - 才能添加主键...

http://www.w3schools.com/sql/sql_primarykey.asp [ ^ ]
SQL UPDATE command is a DML (Data Manipulation Language) command and use to change data and not table structure...
You have to run a DDL (Data Definition Language) command - ALTER TABLE - to add primary key...
http://www.w3schools.com/sql/sql_primarykey.asp[^]


这篇关于更新test1将名称设置为主键(test1作为我的表名)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆