PythonLogin

an anonymous user · September 16, 2021 · SQL
-- create a table
CREATE TABLE IF NOT EXISTS `accounts` (
	`id` int(11) NOT NULL,
  	`username` varchar(50) NOT NULL,
  	`password` bigint(25) NOT NULL,
  	`admin` tinyint(1) NOT NULL,
    PRIMARY KEY (`id`)
);
-- insert accounts
INSERT INTO `accounts` (`id`, `username`, `password`, `admin`) VALUES (1, 'isadmin', -966697084172663693, 1);
INSERT INTO `accounts` (`id`, `username`, `password`, `admin`) VALUES (2, 'isnotadmin', 38429042894289248, 0);
-- fetch some values
SELECT * FROM accounts WHERE admin = 1;

Comments

Please sign up or log in to contribute to the discussion.