求数据库大神解答一下
假设数据库中创建了一个表:
users
(
user_id char(8) not null, // user_id 为主键
user_name nvarchar(10) not null,
user_pwd nvarchar(20) not null
)
①请写出往此表插入一条记录的SQL语句(字段内容自定)
②请写出查询user_id为'19950101',user_pwd 为'xyz0303'的用户是否存在的SQL语句
求数据库大神解答一下
假设数据库中创建了一个表:
users
(
user_id char(8) not null, // user_id 为主键
user_name nvarchar(10) not null,
user_pwd nvarchar(20) not null
)
①请写出往此表插入一条记录的SQL语句(字段内容自定)
②请写出查询user_id为'19950101',user_pwd 为'xyz0303'的用户是否存在的SQL语句
insert into users(user_id, user_name, user_pwd) values('11111111', 'aaa', 'mima')
select count(*) from users where user_id = '19950101' and user_pwd = 'xyz0303'